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
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
http://www.eng-tips.com/viewthread.cfm?qid=234303
sorry !
lp
RE: Link an expression to an attribute
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:
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
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
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.