×
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

Nx6 populating attributes with expressions?

Nx6 populating attributes with expressions?

Nx6 populating attributes with expressions?

(OP)
Hi all
Is there a way to create an attribute that reads its value from an expression?  

RE: Nx6 populating attributes with expressions?

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

 

RE: Nx6 populating attributes with expressions?

(OP)
That worked great! Thanks for the help.

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