Oct 31, 2011 #1 FlashT Mechanical Joined Oct 22, 2010 Messages 11 Location NO 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
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
Oct 31, 2011 #2 JohnRBaker Mechanical Joined Jun 1, 2006 Messages 38,190 Location US 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 http://www.siemens.com/plmUG/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. Upvote 0 Downvote
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 http://www.siemens.com/plmUG/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.
Oct 31, 2011 #3 spadazenon Mechanical Joined Mar 28, 2010 Messages 49 Location GR Try this... if(inner_d<=900)(100)else(if(inner_d<1200 & inner_d>900)(200)else(400)) Upvote 0 Downvote
Oct 31, 2011 #4 JohnRBaker Mechanical Joined Jun 1, 2006 Messages 38,190 Location US 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 http://www.siemens.com/plmUG/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. Upvote 0 Downvote
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 http://www.siemens.com/plmUG/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.
Nov 1, 2011 #5 spadazenon Mechanical Joined Mar 28, 2010 Messages 49 Location GR You are right John, Just pointing out how to make use of operators. Thanx, Spada Upvote 0 Downvote
Nov 1, 2011 Thread starter #6 FlashT Mechanical Joined Oct 22, 2010 Messages 11 Location NO 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'.. Upvote 0 Downvote
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'..
Nov 3, 2011 Thread starter #7 FlashT Mechanical Joined Oct 22, 2010 Messages 11 Location NO Figured it out. Expression-Meassure bodies. Thanks Upvote 0 Downvote
Nov 3, 2011 #8 edgray Automotive Joined Sep 23, 2009 Messages 102 Location US Thanks Spadazenon for the ampersand idea. Upvote 0 Downvote