Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Nx6 populating attributes with expressions? 1

Status
Not open for further replies.

BRENTA

Industrial
Feb 2, 2011
8
Hi all
Is there a way to create an attribute that reads its value from an expression?
 
Replies continue below

Recommended for you

Here is the way that I create a weight attribute from the expression (p63) that came from a weight feature
Listed below are two expressions

p63=40333.8302886129
weight_attribute=ug_setPartAttrValue("WEIGHT",format("%0.0f",p63))

p63 is the expression that contains the weight
"WEGHT" is the name of the attribute that is created
The second zero in 0.0f is how many decimal places are shown in the attribute - in this case it is shown as a whole number - I forgot what the first zero is used for.
You can do this same type of thing with any other expression that you have.
weight_attribute can be named anything that you want - it does not affect the name of the attribute

 
That worked great! Thanks for the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor