Skip to main content
1-Visitor
March 31, 2017
Question

Logic in relations with parameters

  • March 31, 2017
  • 4 replies
  • 1826 views

Dear community,

I would like to use the logic operations in the relation of a parts. But I have a failure message that I don't understand.

IF UNIT = G

error Logischer Ausdruck erwartet.

QUANTITY = MASSE

ELSE

QUANTITY = 1

ENDIF

Thanks in advance for you help.

Pascal

4 replies

HamsterNL
18-Opal
March 31, 2017

If you want to compare values, you'll need to use "double equal-sign"

IF UNIT == G

   QUANTITY = MASSE

ELSE

   QUANTITY = 1

ENDIF

phirschi1-VisitorAuthor
1-Visitor
April 3, 2017

Hi,

Thanks for you reply. The logical test now works but I still have a failure message.

The message is in German, but it means

"Relations contain running conditions and can't be sorted by"

Failuremessage.JPG

Thanks in advance for your help.

Pascal

HamsterNL
18-Opal
April 5, 2017

That is as designed by PTC.

You can NOT use "Sort Relations" if there's an "IF THEN ELSE" statement in your relations.

You just have to be very carefull writing relations, making sure they are in the correct order.

23-Emerald III
March 31, 2017

MASSE will have to be a real value.