Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

API Evaluating SW-Mass@Filename 1

Status
Not open for further replies.

farful

Mechanical
Joined
Mar 27, 2007
Messages
6
Location
US
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?
 
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
 
Thanks! Works perfectly!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top