I have a macro that I wrote long ago that has always had aslight bug in it. I have now decided to try to fix it.
I am using a statement like this [retval =Doc.EditConfiguration3(Name, Name, "", "", OnOff)] to turn on orturn off the Suppress new features and mates box for each config.Works fine except that it turns off the other options also, such asthe value used in the BOM for a part number.
So I decided to look into it and I find that I am stuck on a couplequestions.
The SW help lists the options as this:
swConfigurationOptions2_e
swConfigOption_UseAlternateName - TRUE to use an alternateconfiguration name, FALSE to not
swConfigOption_DontShowPartsInBOM - TRUE to show sub-assemblies inthe Bill of Materials, FALSE to list child components listed in theBill of Materials
swConfigOption_SuppressByDefault - TRUE to suppress newly addedfeatures and mates in this configuration, FALSE to not
swConfigOption_HideByDefault - TRUE to hide newly added componentsto be hidden, FALSE to not
swConfigOption_MinFeatureManager - TRUE to suppress new components,FALSE to not
swConfigOption_InheritProperties - Obsoleted
swConfigOption_LinkToParent - TRUE to link component to parentconfiguration, FALSE to not
swConfigOption_DontActivate
But upon looking in the swconst.tlb file for the values, I findthis list:
Public Enum swConfigurationOptions2_e
swConfigOption_UseAlternateName = &H1
swConfigOption_DontShowPartsInBOM = &H2
swConfigOption_SuppressByDefault = &H4
swConfigOption_HideByDefault = &H8
swConfigOption_MinFeatureManager = &H10
swConfigOption_InheritProperties = &H20
End Enum
As you can see, they don't exactly match. Which one is correct?
The next question is how do I query each config as to each of thosesettings such that I can build the proper value to put back intothe EditConfiguration3 statement? I want to modify the Suppress newfeatures and mates value but leave the others as they are currentlyset.
Any thoughts?
WTSolidworksApi macros
I am using a statement like this [retval =Doc.EditConfiguration3(Name, Name, "", "", OnOff)] to turn on orturn off the Suppress new features and mates box for each config.Works fine except that it turns off the other options also, such asthe value used in the BOM for a part number.
So I decided to look into it and I find that I am stuck on a couplequestions.
The SW help lists the options as this:
swConfigurationOptions2_e
swConfigOption_UseAlternateName - TRUE to use an alternateconfiguration name, FALSE to not
swConfigOption_DontShowPartsInBOM - TRUE to show sub-assemblies inthe Bill of Materials, FALSE to list child components listed in theBill of Materials
swConfigOption_SuppressByDefault - TRUE to suppress newly addedfeatures and mates in this configuration, FALSE to not
swConfigOption_HideByDefault - TRUE to hide newly added componentsto be hidden, FALSE to not
swConfigOption_MinFeatureManager - TRUE to suppress new components,FALSE to not
swConfigOption_InheritProperties - Obsoleted
swConfigOption_LinkToParent - TRUE to link component to parentconfiguration, FALSE to not
swConfigOption_DontActivate
But upon looking in the swconst.tlb file for the values, I findthis list:
Public Enum swConfigurationOptions2_e
swConfigOption_UseAlternateName = &H1
swConfigOption_DontShowPartsInBOM = &H2
swConfigOption_SuppressByDefault = &H4
swConfigOption_HideByDefault = &H8
swConfigOption_MinFeatureManager = &H10
swConfigOption_InheritProperties = &H20
End Enum
As you can see, they don't exactly match. Which one is correct?
The next question is how do I query each config as to each of thosesettings such that I can build the proper value to put back intothe EditConfiguration3 statement? I want to modify the Suppress newfeatures and mates value but leave the others as they are currentlyset.
Any thoughts?
WTSolidworksApi macros