In my current application I would like to be able to pack a group of components in the assembly after they are created. Manually just right clicking the component within the assembly navigator and selecting the "pack" option at the top collapses all 20 instances of my part into a single line in the assembly. This is great and I would like to add this to a program, however, the pack function was not recordable. Neither was the Pack All function.
Does anyone have any ideas how to get this functionality programatically?
There are no APIs available to do pack / unpack components. But there is an option in the customer defaults which always pack all the components in the assembly navigator by default (Refer the attached image).
Foremost I would like to understand your requirement clearly.
Still if you wanna go with programmatically, then macro is the only way to do that by creating custom button in tool bar and assign the action to it.