Continue to Site

Welcome to 3DCADForums

Join our CAD community forums where over 25,000 users interact to solve day to day problems and share ideas. We encourage you to visit, invite you to participate and look forward to your input and opinions. Acrobat 3D, AutoCAD, Catia, Inventor, IronCAD, Creo, Pro/ENGINEER, Solid Edge, SolidWorks, and others.

NX4 - Expressions, if statement

chouvue

New member
in NX4, is it possible to have embedded if statements?

I want an expression for the following scenerio:

**in pseudo code**

if
user_input = A
then
Diameter = 1.0"
if
user_input = B
then
Diameter = 2.0"
if
user_input = C
then
Diameter = 3.0"

****
 
Hi,

Define a expression name user_input & expression as 1 (or) 2 (or) 3.

Now, define the diameter expression name as diameter & expression as
if(user_input==1)1.0 else if(user_input==2)2.0 else 3.0.

It works.
 

Articles From 3DCAD World

Sponsor

Back
Top