Hello,
I am trying to create a macro which will suppress all folders of the same name in an assembly. In my case, I have added all the fasteners in each sub-assembly to a folder appropriately named "Fasteners", so that I can easily suppress all fasteners in an assembly by simply toggling the folder. This helps our sluggish computers handle the model better as there are many, many fasteners within the master assembly.
So - my overall goal is to be able to run a macro while in the master assembly which will suppress all fasteners. The macro below is my best attempt and falls short as it only suppresses the "Fasteners" folder in the top-level of the assembly.
Any help is greatly appreciated.
*************************************************
Dim swApp As Object
Dim Part As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Sub main()
Set swApp = _
Application.SldWorks
Set Part = swApp.ActiveDoc
boolstatus = Part.Extension.SelectByID2("Fasteners", "FTRFOLDER", 0, 0, 0, False, 0, Nothing, 0)
Part.EditSuppress2
Part.ClearSelection2 True
End Sub
*************************************************
SolidworksApi macros