Configuration Properties
Configuration Properties
(OP)
I would like to write a macro to set the part number displayed in BOM to Configuration name, in configuration properties. I have a feeling that it has something to do with ConfigurationManager::SetConfigurationParams.
I can get and list the Configuration parameters. If the above property is set to a user specified name I can change the value of $PARTNUMBER to "$C" then set the parameters and I get what I want.
But if the property is set to document name I have no $PARTNUMBER to change or assign a value.
Any suggestion in how to handle this question?
I can get and list the Configuration parameters. If the above property is set to a user specified name I can change the value of $PARTNUMBER to "$C" then set the parameters and I get what I want.
But if the property is set to document name I have no $PARTNUMBER to change or assign a value.
Any suggestion in how to handle this question?






RE: Configuration Properties
RE: Configuration Properties
Assuming that the variable "MD2" is set to your active part or assembly,
CODE
p(0) = "$PARTNUMBER"
V(0) = "$C"
'Edit default configuration
With Md2
.EditConfiguration3 "Default", "Default", "", "", _
False Or False Or False
.AddOrEditConfiguration "Default", p, V
End With
In this case ".EditConfiguration3" is used to set the options like "Use Alternate Name" and so on. See API help file for more details.
Hope this helps.
Jacques Balzer
www.cons-pan.com
RE: Configuration Properties
I did'not read you question up to the end :).
If the property is set to document name you cannot change that value : it is going to be what it just says, the document name.
Sorry for the previous post.
RE: Configuration Properties
The way I did it is:
CODE
Config.UseAlternateNameInBOM = True
So far it works.