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 MintJulep on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using "AND" in expressions 1

Status
Not open for further replies.

bbylls

Mechanical
Joined
Feb 11, 2011
Messages
163
Location
US
Is it possible to set multiple values in an expression using "AND"?
For instance:
p1="ABC"
OD=1.0
ID=if(p1="ABC")then (.5) AND OD=1.5
This is using NX8.5
I also don't know any of the syntax required if this is possible.
Thanks
 
From the NX Documentation

Relational, Equality and Logical Operators

>
Greater Than

<
Less Than

>=
Greater Than or Equal

<=
Less Than or Equal

==
Equal

!=
Not Equal

!
Negate

& or &&
Logical AND

| or ||
Logical OR


John Joyce
N.C. Programming Supervisor
Barnes Aerospace, Windsor CT
NX6, NX7.5 & NX8.5
Vericut7.2.3
 
I'm not aware of anything like that. You're just going to have to define multiple IF statments; one for the ID and one for the OD.

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

To an Engineer, the glass is twice as big as it needs to be.
 
Note that the 'AND' and 'OR' are only for use in the logic portion (inside the first pair of parenthesis) of the IF statement. They are not there so as to allow the setting of multiple variables. BTW, the use of the 'THEN' betweent the first and second set of parenthesis is purely optional, however you must include an 'ELSE' between the second and third.

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

To an Engineer, the glass is twice as big as it needs to be.
 
Thanks for the clarification John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top