Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Expressions_Not_Match

Status
Not open for further replies.
Sep 13, 2016
10
0
0
IN
hello NX Experts,

I am still getting error in Expressions,

eg.
i wanna get variable sizes of keyway , but when i insert the value of that as below,

if(p0=120) then (25.0) else (20) & (if(p0=140) then (35.0) else (20)) & (if(p0=150) then (45.0) else (20.0)) & (if(p0=200) then (45.0) else (20.0)))

but when i change size,Size not changed, got error in expressions,

eg. for when i change size p0 to 120 it changed to 25 , but when i change p0 to 140 , it should be changed to 35.0 , but not got result., it should be changed as i given sizes.

i attached file for more information

anybody have idea for this


Best Regards,

Thomas Roman
Machine Designer
 
 http://files.engineering.com/getfile.aspx?folder=ee6e5225-398e-4fdf-8a79-e32ddf205ef2&file=Part_121_611_553.prt
Replies continue below

Recommended for you

You have And statements which basically says that it has to comply to all conditions...
I think you are looking for below.

If ( p0 = 120 )
Then ( 25 )
Else If ( p0 = 140 )
Then ( 35 )
Else If ( p0 = 150 | p0 = 200 )
Then ( 45 )
Else ( 20 )

So;
120 produces 25
140 35
150 OR 200 45
All other values will produce 20

Ronald van den Broek
Senior Application Engineer
Winterthur Gas & Diesel Ltd
NX9 / TC10.1.2
HPZ420 Intel(R) Xeon(R) CPU E5-1620 0 @ 3.60GHz, 32 Gb Win7 64B
Nvidea Quadro4000 2048MB DDR5

HP Zbook15
Intel(R) Core(TM) i7-4800MQ
CPU @ 2.70 GHz Win7 64b
Nvidia K1100M 2048 MB DDR5

 
thomas said:
how can i get information like this!!!!!!!!!!!!!!!!
When in Expression menu press the F1 button... :)


Ronald van den Broek
Senior Application Engineer
Winterthur Gas & Diesel Ltd
NX9 / TC10.1.2
HPZ420 Intel(R) Xeon(R) CPU E5-1620 0 @ 3.60GHz, 32 Gb Win7 64B
Nvidea Quadro4000 2048MB DDR5

HP Zbook15
Intel(R) Core(TM) i7-4800MQ
CPU @ 2.70 GHz Win7 64b
Nvidia K1100M 2048 MB DDR5

 
Status
Not open for further replies.
Back
Top