×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Configuration Properties

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?



RE: Configuration Properties

(OP)
Any suggestions?

RE: Configuration Properties

Here is one :
Assuming that the variable "MD2" is set to your active part or assembly,

CODE

Dim p(0 To 0) As String, V(0 To 0) As String
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
you can replace "Default" by any existing configuration name, build a loop to update all existing configurations, ....
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

Hooooops !!!
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

(OP)
Thank you for your support.

The way I did it is:

CODE

Config.AlternateName = " "
Config.UseAlternateNameInBOM = True

So far it works.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources