Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Create expression that inherits an attribute value

Status
Not open for further replies.

3dr

Automotive
Jul 10, 2004
451
I did a lot of this in NX9 for automating some BOM tasks.
But the expression dialogue in NX11 seems to have taken away some of that functionality.

Sometimes the Attribute was driven by the Expression value (Which I can still do)
Sometimes the Expression was driven by the Attribute value (Cant find the tools anymore)

TIA for any help



Dave
Automotive Tooling / Aircraft Tooling / Ground Support Structures

NX9, Win 7 Pro SP1
 
Replies continue below

Recommended for you

If you right click on the formula entry box and choose "edit...", a new dialog will open where you can find the formula function reference, measurement reference, attribute reference, etc.

I've not used it much, yet; but so far, I'm not a big fan of the new expression dialog format.

www.nxjournaling.com
 
This is an example of a expression calling for a value of attribute "MM_PART_NUMBER".

With expression Type String selected. The formula would be ug_askPartAttrValue( "MM_PART_NUMBER" )
 
I don't recommend using the ug_askPartAttrValue function anymore (unless you must for some odd reason); if I remember correctly, it doesn't update immediately when the attribute changes. The attribute system got a major overhaul around NX 8 and now attributes and expressions are essentially the same thing. If you create an expression that references a part attribute, the "attribute expression" will show up in the expression list. Once you know the "p" number of the attribute expression, you can reference it directly as any other expression.

www.nxjournaling.com
 
@ Cowski's first post:
I've been noodling around with it.

It looks as if the only way to get the flow to be "Attribute to Expression" is to create an Attribute that references the Attribute you want to link too... then an expression is automatically created to the new attribute.

Then if you delete the one you originally referenced and rename the new one... you've got what you want.

Seems crazy... or maybe I'm just running around the block before I cross the street.



Dave
Automotive Tooling / Aircraft Tooling / Ground Support Structures

NX9, Win 7 Pro SP1
 
Wow, just tried it and it is awkward. NX10 was much easier.

NX10.0.0.24 MP1/Windows 7 Service Pack 1
 
@3dr,

i noticed this as well. its deff forcing us to create two expressions to be able to use just one of them. Unless i'm doing something wrong... i tried to reference mass into an attribute and it always creates two entries to do this. Seems really strange, why not just one? seems like a circular reference at worst and an unnecessary complexity at best.

Surely i'm doing something wrong, i'm just a plebian!
 
i notice that aswell on 9, but im creating them manually so dosnt create 2

NX8.5 - NX9 - NX 10 - NX11
 
Regarding the one expression / two expression question, here's the philosophy behind what we're doing here (and with interpart expressions, too.)

Attribute expressions and interpart expressions are now blue system expressions (like measurement expressions) and their formulas are locked (read-only, in essence.) And so, if you've already created an expression name, then we want to preserve the name you created, AND leave the formula in a state where you can continue to edit it. And so we'll create a new blue system expression in that case in addition to YOUR expression that you're creating.

Here's a little trick... If you create an interpart expression or attribute expression WITHOUT assigning a name first, then there won't be a second expression. We'll just create the blue system expression, and you can start using it.

A bit subtle, perhaps, but that's the way to always avoid the second expression, if that's what you're after.



Taylor Anderson
NX Product Manager, Knowledge Reuse and NX Design
Product Engineering Software
Siemens Product Lifecycle Management Software Inc.
(Phoenix, Arizona)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor