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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Repeat Region Relation

BenLoosli
23-Emerald II

Repeat Region Relation

We have the standard bulk item relation in the BOM that sets QQTY to AR if the item is a bulk item part.

I added a second relation that would set the QTY to AR if the number was a certain value. It was a shown item in the drawing, a clamp, that was noted use as many as needed. When I regened the drawing, my item QTY went to AR and the bulk item QTY fields went to blank.

Is there some trick to getting both relations to execute and populate the BOM properly?

Ben

Windchill 10.0 m040

Creo 2.0 m100


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.
1 ACCEPTED SOLUTION

Accepted Solutions
TomU
23-Emerald IV
(To:BenLoosli)

Right, The last one wins.  The second relation is changing ALL values back to rpt_qty (except for "TPZ-652").  Just remove the "ELSE" section completely from the second set of relations.  You don't need it.

View solution in original post

6 REPLIES 6
TomU
23-Emerald IV
(To:BenLoosli)

Can you share your relations?

BenLoosli
23-Emerald II
(To:TomU)

IF asm_mbr_type=="BULK ITEM"

QTY="AR"

ELSE

QTY=rpt_qty

ENDIF

IF asm_mbr_pdm_number == "TPZ-562"

QTY="AR"

ELSE

QTY=rpt_qty

ENDIF

With only the first relation for Bulk Items, all of the bulk item QTY fields go to AR.

When I add the second relation, the QTY filed for TPZ-562 goes to AR and the bulk items all go QTY blank.

TomU
23-Emerald IV
(To:BenLoosli)

Right, The last one wins.  The second relation is changing ALL values back to rpt_qty (except for "TPZ-652").  Just remove the "ELSE" section completely from the second set of relations.  You don't need it.

BenLoosli
23-Emerald II
(To:TomU)

I like this solution best as it does not need the ELSE clause.

Thank you both for the help.

StephenW
23-Emerald II
(To:BenLoosli)

Yea, what Tom said...the way I do it is by combining all in to one continuous IF

IF asm_mbr_type=="BULK ITEM"

QTY="AR"

ELSE

IF asm_mbr_pdm_number == "TPZ-562"

QTY="AR"

ELSE

QTY=rpt_qty

ENDIF

ENDIF

Although I don't rightly remember if I'm supposed to keep the ELSE in the middle or not...always a little trial and error for me.

TomU
23-Emerald IV
(To:StephenW)

Nested IFs works okay for a limited number of conditions, but if checking for many of them, then I think it's cleaner to keep each one independent.  To each their own! 

Top Tags