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!

NX12: If Else in attributes

Status
Not open for further replies.

NutAce

Mechanical
Apr 22, 2010
1,192
Hello All,

I have a bit of a particular problem. I want to show on a Drawing a text string which is created from a number of attributes. However, the attributes are Boolean's mapped from Teamcenter.
Code:
Standard GB=True
Standard ISO=True
Standard JIS=True

What I want the text string to show is "Standard; ISO,JIS,GB" when all three are true. And when only GB and ISO are true "Standard; ISO,GB"
So the string should show ONLY the attributes which are true. Any ideas on how to do this?
Basically you would build an If-Else statement but Not sure how to do this with attributes (if at all possible)

The Attributes are located on the UGPart (So no direct access to the expressions)




Ronald van den Broek
Senior Application Engineer
Winterthur Gas & Diesel Ltd
NX9 / TC10.1.2

Building new PLM environment from Scratch using NX11 / TC11
 
Replies continue below

Recommended for you

Ronald --

You're not going to be able to do If-Else logic directly in the Attributes system.

Easily doable a few different ways with expressions, if you can rearrange the location of the attributes at all.

Here's one way:

2018-05-10_2-07-56.png


...where the formula for Standard_String is:

2018-05-10_2-10-06.png


Again, there are several ways to skin this cat. This is just one that works well, using a "procedural block" within the expression. :)

But yeah... there's no direct solution in attributes.


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