×
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

prevent expression from being deleted

prevent expression from being deleted

prevent expression from being deleted

(OP)
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

RE: prevent expression from being deleted

I don't think so, but I like your idea.
What you can do is export your expressions to a text file for safety.

RE: prevent expression from being deleted

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.

RE: prevent expression from being deleted

(OP)
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.

RE: prevent expression from being deleted

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.

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