×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

If not working in expressions

If not working in expressions

If not working in expressions

(OP)
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

RE: If not working in expressions

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

/Lars

RE: If not working in expressions

(OP)
thanksblush

----
kukelyk

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources