×
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

Link an expression to an attribute

Link an expression to an attribute

Link an expression to an attribute

(OP)
thread561-279206: Attributes in assembly - dependent one from another

Hi !

I've looked into the thread561-279206: Attributes in assembly - dependent one from another and this is pretty close to what i'm looking for, except that I would like to get a real number (not an integer) to be in the attribute.

When i use :

ug_setPartAttrValue( "CustomAttribute_1", format("%0.0f",85.25 ))

I get 85 in the attribute value. I guess it has to be because of the format syntax.

I looked into the help collection and there is nothing about

- format() and its syntax
- ug_setPrtAttrValue

John, where can we find these functions ?

txs !

Louis
 

RE: Link an expression to an attribute

I'm glad that you found your answer and posted back, thanks!

To add a little to the previous answer:
NX seems to use a formatting function/syntax that has been in use for decades in various programming languages. For a more thorough explanation of the options have a look at: http://en.wikipedia.org/wiki/Printf#Format_placeholders

Disclaimer: I'm not sure that NX supports all the options listed in the article, but it can't hurt to try them out!

www.nxjournaling.com

RE: Link an expression to an attribute

(OP)
Hi,

Thanks for the wiki link !

But at the end, I still have a question that you might be able to answer:

Where can I find a list of those function (if they are called that way) ?

I search thru the entire help collection for "ug_setPartAttrValue" and found no hit !!!!!

Rgds,

Louis
 

RE: Link an expression to an attribute

Don't get to bogged down in this as the entire procedure for linking Expressions and Attributes has been changed in NX 8.0 and while any file set-up using the current KF functions (that's what those things are that you find under the f(x) button on the Expression dialog) will still update and behave as it did before, we will be removing these options from the Expression dialog (they'll still be there, just not easily accessed).

BTW, if you want to find the documentation on any of those KF functions under the f(x) button on the Expression dialog, just select one of them and you'll see the standard 'Help' icon (?) appear, just select it and you'll get help for that function.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
http://www.siemens.com/plm
UG/NX Museum:   http://www.plmworld.org/p/cm/ld/fid=209

To an Engineer, the glass is twice as big as it needs to be.
 

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