Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

user defined expression in an UDF

Status
Not open for further replies.

uwam2ie

Automotive
Jul 11, 2005
1,008
I'm looking for a solution in an UDF. If created an hole feature and want to defined the values with userdefined expression with if else if structures:
my new expression:
m=10
the first feature expressions
p5= if (m=3) (3.5) else if (m=4) (4.5) etc.
p6= if (m=3) (6) else if (m=4) (8) etc.
.
.
.
question:
how can I get this work in an UDF
how can I define userdefined expression not shown in the UDF wizard in / into an UDF
thx in ad
 
Replies continue below

Recommended for you

If u are defining m,p5,p6...in the file from which u are CREATING UDF, there should not be any problem.

You need to include "m" in the UDF creation. Either enter a range or set of values for "m".

Now coming to the value of "m",
If "m" is defined in the file in which u are CALLING udf, then udf will take this value.
If not udf will take the value of "m" that u will select while inserting UDF.

Note that UDF always PREFERS the expressions in the calling part. Suppose in calling part m=2 and while inserting if u have selected m=4 (from the udf dialog), UDF will take the value m=2. To avoid this u can lock the expression (Tools->Expressions->Lock) while u are CREATING UDF.
 
Ok it seems to be buck in NX
user defined expression in udf's in logic functions do not work. I works only when the expression is set directly in the udf in a parameter
tip to all udf programmers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor