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
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
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
http://www.eng-tips.com/viewthread.cfm?qid=281494
somewhere half the post it gets interesting for you.
Best regards,
Michaël.
NX7.5.4.4 + TC Unified 8.3
Win 7 64 bit
RE: Controlling other expressions with one expression
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.