Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Nested if-statement in NX 7.5

Status
Not open for further replies.

FlashT

Mechanical
Oct 22, 2010
11
Hi,

Can someone please help me out with this nested if statement that does not work:

if(inner_d=<900)(100)else(if(1200>inner_d>900)(200)else(400))

Kind regards

FT
 
Replies continue below

Recommended for you

This give you what you want:

if(inner_d<=900)(100)else(if(inner_d>1200)(400)else(200))

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
UG/NX Museum:
To an Engineer, the glass is twice as big as it needs to be.
 
Try this...

if(inner_d<=900)(100)else(if(inner_d<1200 & inner_d>900)(200)else(400))
 
You're both making it more complex than it needs to be. If there are only 3 conditions which you wish to test for:

A = less than or equal to 900
B = greater than 900 but less than 1200
C = greater than 1200

You really only need to make TWO tests. If it does not meet 'A' or 'C', then by definition, it must be 'B'.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
UG/NX Museum:
To an Engineer, the glass is twice as big as it needs to be.
 
You are right John,

Just pointing out how to make use of operators.

Thanx,

Spada
 
Thanks a lot!

I am also trying to make an expression that is related to an objects mass(centripetal force). I know that I can measure the mass by clicking 'analysis-measure bodies'..

 
Figured it out.

Expression-Meassure bodies.

Thanks
 
Thanks Spadazenon for the ampersand idea.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor