cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

Translate the entire conversation x

ProProgram syntax

MarkHeinze
10-Marble

ProProgram syntax

I have defined a condition for a feature creation in ProProgram which works fine:

IF D42 > 0

...blah...feature definition...

ENDIF

But trying to add a second condition yields this error:

IF D42 > 0 AND D48 > D43

!*** ERR: line contains a bad symbol or is otherwise invalid

Same goes for this attempt:

IF D42 > 0 AND IF D48 > D43

!*** ERR: line contains a bad symbol or is otherwise invalid

I assume this is a syntax error. Can someone please help me out with this?

ACCEPTED SOLUTION

Accepted Solutions
BenLoosli
23-Emerald III
(To:MarkHeinze)

The conjunction operand is &, not AND.

IF D42 > 0 & D48 > D43

   expressions

ENDIF

You can evaluate any Pro/Program relations in the standard relation editor to see is they work before moving the code to the program.

Check out the WF4 Help Topic Collection Fundamentals.pdf for the symbol syntax for relations.

View solution in original post

3 REPLIES 3

A colleague suggested nesting the ifs like this (and it works):


IF D42 > 0

IF D48 > D43

...blah...feature definition...

ENDIF

ENDIF

Still I wonder if there is a way to do the two conditions in one if nest?

BenLoosli
23-Emerald III
(To:MarkHeinze)

The conjunction operand is &, not AND.

IF D42 > 0 & D48 > D43

   expressions

ENDIF

You can evaluate any Pro/Program relations in the standard relation editor to see is they work before moving the code to the program.

Check out the WF4 Help Topic Collection Fundamentals.pdf for the symbol syntax for relations.

That works. Thank you.

Announcements
NEW Creo+ Topics: Real-time Collaboration

Top Tags