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

IF ELSE relations causing model check errors

Highlighted
Participant

IF ELSE relations causing model check errors

I have entered the following relation and get model check error stating that I have multiple relation assignments. Is there anything wrong with how I have written this or is their a better way of acomplishing this?

Thanks!

Jason

My relation:

MATERIAL = MATERIAL_PARAM("condition")

If material=="A"
description_line2=material + " (SEE NOTES)"
Else
If material=="B"
description_line2=material + " (SEE NOTES)"
Else
If material=="C"
description_line2=material + " (SEE NOTES)"
Else
If material=="D"
description_line2=material + " (SEE NOTES)"
Else
description_line2=material
Endif
Endif
Endif
Endif

Here is what model check is returning:

RELATION_MULTNumber of multiple assignments in the relation file:13Ifmaterial description_line2 Else Ifmaterial description_line2 Else Ifmaterial description_line2 Else description_line2 Endif Endif Endif

1 REPLY 1
Highlighted

SUMMARY: IF ELSE relations causing model check errors

Problem solved!! Twice!

Solution 1:

This sounds like one I ran into at one time. If I remember correctly, ModelCHECK has difficulty with the mixed case on the "If" in your relation. Try changing the word "If" in yourrelation to be all lower (if)or all upper (IF)case and see if the problem goes away. I would also do the same for the "Else" and "Endif" statements as well. I opened a call when I discovered this and PTC opened an SPR. I don't recall when it was going to be corrected, but I want to say it was in Wildfire 5.

Ron

Solution 2:

I would try just using the OR pipe (|) in your conditional instead of mutiple conditions:

MATERIAL = MATERIAL_PARAM("condition")

If material=="A" | materal == “B” | materal == “C” | materal == “D”
description_line2=material + " (SEE NOTES)"
Else
description_line2=material
Endif

Eric

Thank you Ron and Eric.

Jason

Original post:

Original post:Dec 12, 2008 11:06 AM

I have entered the following relation and get model check error stating that I have multiple relation assignments. Is there anything wrong with how I have written this or is their a better way of acomplishing this?

Thanks!

Jason

My relation:

MATERIAL = MATERIAL_PARAM("condition")

If material=="A"
description_line2=material + " (SEE NOTES)"
Else
If material=="B"
description_line2=material + " (SEE NOTES)"
Else
If material=="C"
description_line2=material + " (SEE NOTES)"
Else
If material=="D"
description_line2=material + " (SEE NOTES)"
Else
description_line2=material
Endif
Endif
Endif
Endif

Here is what model check is returning:

RELATION_MULTNumber of multiple assignments in the relation file:13Ifmaterial description_line2 Else Ifmaterial description_line2 Else Ifmaterial description_line2 Else description_line2 Endif Endif Endif


Announcements