Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

If not working in expressions

Status
Not open for further replies.

kukelyk

Industrial
Mar 21, 2005
315
Type: Number
Name: a
Formula: if(length>100)(3)

Error message:

The specified string contains a syntax error
Syntax error here
(Number [mm]) a: if(length>100)(3);

Error from the log:

&MACRO ASK_ITEM 1507328 (1 STRN 0) = "if(length>100)(3)" !
&MACRO ASK_ITEM 1310720 (1 STRN 0) = "a" !
&MACRO ASK_ITEM 1310720 (1 STRN 0) = "a" !
&MACRO ASK_ITEM 1507328 (1 STRN 0) = "if(length>100)(3)" !
&MACRO EVENT ACTIVATE 0 0, 1507328, 0, 0, 0!
&MACRO ASK_ITEM 1507328 (1 STRN 0) = "if(length>100)(3)" !
&MACRO ASK_ITEM 1507328 (1 STRN 0) = "if(length>100)(3)" !
&MACRO ASK_ITEM 13 (1 OPTM 0) = 1 ! mm
&MACRO ASK_ITEM 1507328 (1 STRN 0) = "if(length>100)(3)" !
&MACRO ASK_ITEM 1310720 (1 STRN 0) = "a" !
&MACRO ASK_ITEM 13 (1 OPTM 0) = 1 ! mm
&MACRO ASK_ITEM 12 (1 OPTM 0) = 2 ! Length
&MACRO ASK_ITEM 11 (1 OPTM 0) = 0 ! Number
!!!&MACRO EVENT FOCUS_OUT 0 0, 1507328, 0, 0, 0! (Application CB Nested)
!!!&MACRO ASK_ITEM 1507328 (1 STRN 0) = "if(length>100)(3)" !
&MACRO FOCUS CHANGE IN 1
&MACRO MESSAGE_BOX -2 The specified string contains a syntax error
&MACRO MESSAGE_TEXT
&MACRO MESSAGE_TEXT Syntax error here
&MACRO MESSAGE_TEXT (Number [mm]) a: if(length>100)(3);
&MACRO MENU, 0, UG_HELP_SYSTEM_LOG UG_GATEWAY_MAIN_MENUBAR ! <MB/Toolbar>

what can be the problem?
I am on NX 8.0.3.4

----
kukelyk
 
Replies continue below

Recommended for you

You need an ELSE...
IF(length > 100)(3) ELSE (0)

/Lars
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor