Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Link an expression to an attribute

Status
Not open for further replies.

LpLebel

Aerospace
Dec 7, 2011
10
thread561-279206

Hi !

I've looked into the thread561-279206 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
 
Replies continue below

Recommended for you

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:
Disclaimer: I'm not sure that NX supports all the options listed in the article, but it can't hurt to try them out!

 
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
 
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
UG/NX Museum:
To an Engineer, the glass is twice as big as it needs to be.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor