Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

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

prevent expression from being deleted

Status
Not open for further replies.

multicaduser

Industrial
Joined
Jan 29, 2013
Messages
261
Location
US
Is there any way to keep an expression from being deleted during part cleanup? For example, an expression that sets a part attribute is not protected when it comes to part cleanup, even though it is being referenced. I am not referring to locking an expression, by the way.

NX9.0.3.4, windows 7
 
I don't think so, but I like your idea.
What you can do is export your expressions to a text file for safety.
 
Actually I would consider that behavior, deleting Expressions, which are setting Attributes, during 'Part Clean-up', as inappropriate and I would contact GTAC and have them open an IR/PR to that effect. Question first; this expression that is setting an Attributes, was it created using the new Attribute functions or is it using the older KF routines from the list of 'functions' that can be imbedded in an expression, such as 'ug_setPartAttrValue' or 'ug_askPartAttrValue'?

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Digital Factory
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.
 
jerry1423, exporting the expressions to a text file is what I'm doing right now for backup and a sanity check. The text file gets cleaned up to contain just the appropriate expressions.

John Baker, I'm using the 'ug_setPartAttrValue' function in expressions, not sure exactly what you are referring to by the "new Attribute functions". The component is based on one of your examples, the hand wheel I believe, and it holds some very intriguing possibilities for flexibility in a component.

To explain a little more completely, "file->utilities->attribute templates" is setup so the user can select certain options. These options are used to select expressions from a list which also set part attribute values for the bill of materials. It all works very slick until the part cleanup routine is run, then the bom attribute setting expression gets wiped out.

A call to gtac it is.
 
The 'ug_setPartAttrValue' function is an older and now all but obsolete approach to linking Attributes to Expressions. Starting with NX 8.0 you no longer have to use these so-called KF 'functions' to do that as there are now direct methods for creating BOTH Attributes linked to the value of an Expression and Expressions linked to the value of an Attribute.

In the case of the replacement for the 'ug_setPartAttrValue' function, just go to the...

File -> Properties -> Attribute

...dialog and enter the name of the Attribute you wish to create, set the 'Date Type' to the appropriate option (note that you can only use Integer, Number of String Data Types) and then select the 'Link to Expression' icon to get a list of available Expressions.

Note that there is also new functions on the Expression dialog to create Expressions linked to existing Attributes so both 'directions' are now covered using built-in functions. And while it is true that the older KF functions are still supported, you'll note that if you were to go into the Expression 'Function' list, f(x), you would see that the Attribute functions have been removed since we no longer want our customers to use them.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Digital Factory
Cypress, CA
Siemens PLM:
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

Back
Top