×
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

Controlling other expressions with one expression
2

Controlling other expressions with one expression

Controlling other expressions with one expression

(OP)
Hey, is there a way that I can use an if statement, and if p3=1, it will change p4 to 7 and p5 to 9, and if p3=2, it will change p4 to 3 and p5 to 12?

RE: Controlling other expressions with one expression

Sure, can you get onto the NX doc? If you can then look up "conditional expressions"
Maybe do a search in here for those two words too.
You will be able to write an "If-Then" statement for those.

RE: Controlling other expressions with one expression

(OP)
I really wasn't able to find anything like I am talking about, I dont think.

I kind of want to add an expression like this

if(test=1)(e=32 & q=23) else (e=36 & q = 58)

Does that clarify any?

RE: Controlling other expressions with one expression

2
Using IF statements, your set of expressions would look like:

p3=1

p4=IF (p3==1) THEN (7) ELSE ( IF (p3==2) THEN (3) ELSE (0))

p5=IF (p3==1) THEN (9) ELSE ( IF (p3==2) THEN (12) ELSE (0))


And starting with NX 8.0 you now have another and perhaps more elegant option and that is the new 'nth' expression, in which your set of expressions would look like:

p3=1

p4=nth(p3,{7,3})

p5=nth(p3,{9,12})


In either case, changing p3 from '1' to '2' would change p4 from '7' to '3' and p5 from '9' to '12'.

 

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
http://www.siemens.com/plm
UG/NX Museum:   http://www.plmworld.org/p/cm/ld/fid=209

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