×
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

API Evaluating SW-Mass@Filename

API Evaluating SW-Mass@Filename

API Evaluating SW-Mass@Filename

(OP)
I currently have a macro to extract information from a part into an Excel file, such as its description and weight. I'm using the following:

ModelDoc.CustomInfo2(Configuration.Name, "Description")
ModelDoc.CustomInfo2(Configuration.Name, "Weight")

However, I'm having a problem with the weight. Instead of getting the evaluated value of the weight, I get the text string of "SW-Mass@@Configuration Name@Document Title". How can I get the numerical value of the weight instead of the text string?

RE: API Evaluating SW-Mass@Filename

farful,

If you are using SW2007 you want call CustomPropertyManager.Get2 (you will need to get the CustomPropertyManger object first).  For SW2006 and SW2005 use ModleDoc2.GetCustomInofValue.

Note that in SW2007 ModelDoc2.CustomInfo2 is obsolete.

SA

RE: API Evaluating SW-Mass@Filename

(OP)
Thanks! Works perfectly!

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