I have made a VBA program that lists properties for SW-files. I would also like to show the value of the check-box "don't show child component in BOM when used as a sub-assembly"
I use the following code Dim swApp As SldWorks.SldWorks Dim Model As ModelDoc2 Dim numConfigs As Long Dim Names As Variant
Set swApp = CreateObject("sldWorks.application") Set Model = swApp.OpenDoc6(path & filename, swDocASSEMBLY, swOpenDocOptions_Silent, "", lngErrors, lngWarnings)
numConfigs = Model.GetConfigurationCount() Names = Model.GetConfigurationNames() For i = 0 To (numConfigs - 1) MsgBox ("Config #" + Str(i) + " is: " + Names(i)) Next
This lists the names of the different configurations - but I cant figure out how to access the field "ShowChildComponentsInBOM" I looked at API help - but it doesn't really help me on this one - so a specific example would be nice.
Any help?
John