Turn Off Custom Configuration Description

Good Morning Everyone,

I was wondering if anyone knew a way to uncheck the "Use in bill of materials" option in the configuration properties. I know how to turn it on, but i need to turn it off.

Thanks in advance!

-Trevor

SolidworksApi macros
Answers 5
SF
SF 2015-05-15 Best Answer

Do you mean exclude from BOM? If so, right click a part, and choose properties.

comment imagecomment imagecomment imagecomment image
SF
SF 2015-05-15

Not quite, I want to avoid the description in configuration overriding the description in the properties which will happen if that box is checked. I want to have the box unchecked with a macro.

SF
SF 2015-05-15

Hi Trevor,

ModelDoc2::EditConfiguration3


swConfigOption_UseAlternateName

swmodel.EditConfiguration3("Default", "Default", "", "", swConfigOption_UseAlternateName)

Modify the code in your macro and see the result.

Thanks,

Joseph.I

ms-its:sldworksapivb6.chm::/sldworks~ModelDoc2~EditConfiguration3.html

SF
SF 2015-05-18

Thanks Joseph! I am close now. I've got the option correct but can't get it to set false.

swModel.EditConfiguration3 defaultConfig, "", "", "", swConfigOption_UseDescriptionInBOM = False

ST
ST 2015-05-18

Just use zero:

swModel.EditConfiguration3 defaultConfig, "", "", "", 0

The options for swConfigurationOptions2_e only get turned on if you specify them. So by missing them out, you are setting them to false.