I’m trying to automate setting the visibility (Hide) of components in various display states. The components are grouped in Folders. I’m able to set each component one at a time using the following:
SetVisibilityInAsmDisplayStates Method (IComponent2)
http://help.solidworks.com/2021/english/api/sldworksapi/solidworks.interop.sldworks~solidworks.interop.sldworks.icomponent2~setvisibilityinasmdisplaystates.html
This method takes a long time as each component is set one at a time. If I were to do this manually, I would select the folder, and select Hide and all the components in the folder are hidden immediately altogether.
How can I do this through the API in VBA? I can’t seem to find a method.
SW2021SP2