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

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

Relation in Repeat Region

Ketan_Lalcheta
19-Tanzanite

Relation in Repeat Region

Hello,

I would like to know how one can use OR into repeat region relation.

My scenario is as below:

If PartName = "001" or Param1= "001_Updated"

/*Do something

end if

Regards

Ketan


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
7 REPLIES 7

If you have OR you can do like this:

If PartName = "001"

/*Do something

end if

If Param1= "001_Updated"

/*Do something

end if

If CREO has no "OR", you can use a variable as a way around it.

i = 0;

if i=0

     if partname = "001"

          /*Do

          /*i=1

     end if

end if

if i=0

     if partname = "001_v2"

          /*Do

          /*i=1

     end if

end if

This way, in case you have both, it won't do the same action twice.

There is an ELSE function that may work.

I haven't tried this, so it may need to be tinkered with:

IF PartName = "001"

/*Do Something

ELSE

IF Param = "001_Updated"

/*Do Something

ENDIF

ENDIF

Hi,

I need to do same thing for PartName as 001 and 001_Updated both... Else condition will not work as repetition will happen. In addition to that, I do have scenarios of 002 and 002_Updated and so on as well....

Regards

Ketan

Use the "|" to represent the OR function. "&" is for AND.

TomU
23-Emerald IV
(To:Ketan_Lalcheta)

Creo relations, including repeat region relations, uses the ampersand (&) for AND and the pipe (|) for OR.

IF PartName == "001" | Param1 == "001_Updated"

    /* Do something

ENDIF

TomU
23-Emerald IV
(To:TomU)

Sorry David.  Your post wasn't visible when I was replying.  Hopefully the forum bug isn't back.

Top Tags