ds-blue-logo
Preview  |  SOLIDWORKS USER FORUM
Use your SOLIDWORKS ID or 3DEXPERIENCE ID to log in.
AGAlexandre G.07/06/2021

How to manage hidden bodies of an assembly drawing view with SolidWorks API ?

Use-case:

- Create a multi-body part with two or more any solid bodies

- Create an assembly and insert a component of the previously created part

- Create a drawing with a simple view of the previously created assembly

- Create a macro to add user selected bodies of the view into the property panel "Show/Hide bodies"


To realize this last task we call SelectionManager::GetSelectedObject6 to obtain selected bodies references array. Which method have I to call to add the selected bodies into the property panel "Show/Hide bodies" of the view ?


Note: In case of the drawing view references directly the multi-body part, I know I can use View::Bodies property to manage hidden bodies but my question is for an assembly view of multi-body part(s). In other words: What is the function equivalent to View::Bodies when the view references an assembly ?