show the main configuration, not derived
Posted: Thu Aug 10, 2023 1:54 pm
All
I have a section in a macro (see below) that first creates a Default configuration if there isn't one already then sets the Default configuration to active. I would like to add some lines that will show the main configuration (do you call it "main"?) if there are any derived configurations and also collapse any exploded configuration that might be showing. I find nothing in help right off. Could someone suggest a line or lines to add to the section below that would do the job?
Thanks
Dwight
If swModel.GetConfigurationByName("Default") Is Nothing Then
Dim swConfig As SldWorks.Configuration
Set swConfig = swModel.AddConfiguration3("Default", "", "", swConfigurationOptions2_e.swConfigOption_UseDescriptionInBOM)
MsgBox "A Default configuration was created. Please delete other configurations if they are not needed."
End If
swModel.ShowConfiguration2 ("Default")
I have a section in a macro (see below) that first creates a Default configuration if there isn't one already then sets the Default configuration to active. I would like to add some lines that will show the main configuration (do you call it "main"?) if there are any derived configurations and also collapse any exploded configuration that might be showing. I find nothing in help right off. Could someone suggest a line or lines to add to the section below that would do the job?
Thanks
Dwight
If swModel.GetConfigurationByName("Default") Is Nothing Then
Dim swConfig As SldWorks.Configuration
Set swConfig = swModel.AddConfiguration3("Default", "", "", swConfigurationOptions2_e.swConfigOption_UseDescriptionInBOM)
MsgBox "A Default configuration was created. Please delete other configurations if they are not needed."
End If
swModel.ShowConfiguration2 ("Default")