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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Drawing BOM modifications (relation issue)

jraska
1-Visitor

Drawing BOM modifications (relation issue)

I am currently struggling/fighting with modifying a drawing BOM. Something that is normally an easy task.

I am trying to accomplish two things. First swap out a couple part names. Second modify a part quantity.

When I create a relation to swap out part name that has worked for me in the past and as recent as yesterday. It does one of two things. Either carries the part number that I just renamed up through the rest of the BOM part number column. Or completely removes all TXT from that same part number column and may may blank out additional columns as well.

What am I doing wrong?


This is the relation as I am using it:

if asm_mbr_name=="7082105_50_8_MM"

prtnum="7082105"

qty1="5"

else

prtnum=asm_mbr_name

ENDIF


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.
2 REPLIES 2

how are your tables labeled?

are they default or custom names ie for quanty -

default: rpt_qty

custom: &rpt.rel.bom_qty

example to change qty value from number to AR (as required)

code in bom table relation:

/*****QTY TO AR*****

/* ASSIGN THE MODEL NAME AND QUANTITY TO PARAMETERS

bom_qty=rpt_qty

bom_name=asm_mbr_name

/*CHANGE QUANTITY TO AR IF PART CODE INDICATES BULK ITEM

IF STRING_LENGTH(bom_name)==8

IF name_check=="119"

  bom_qty="AR"

ENDIF

/* REMEMBER TO CHANGE QUAN. in BOM Table TO

/* rpt.rel.bom_qty

/* REMEMBER TO CHANGE THE PART NUMBER in BOM table TO

/* rpt.rel.bom_name

Hope this gives some insight

ron

DonSenchuk
12-Amethyst
(To:jraska)

I'd play around with separating the prtnum from qty1. Put them into separate relations to see what you're missing.

IF asm_mbr_name == "7082105_50_8_MM"

prtnum = "7082105"

ELSE

prtnum = asm_mbr_name

ENDIF

IF asm_mbr_name == "7082105_50_8_MM"

qty1 = "5"

ELSE

qty1 = rpt_qty

ENDIF

So the first thing we see that you were missing is the 'qty1' = rpt_qty bit. Without that the repeat region doesn't know what to do in the quantity column.

Once you verify those, change your repeat region so &rpt.rel.prtnum appears in the part number column and &rpt.rel.qty1 appears in the quantity column.

(It's possible to combine them but I find if one has too many combined it's just asking for confusion.)

One other note: Something I've noticed is nearly every time a user performs copy/paste for these relations they fail. But, if they type it all out it works just fine. It might be Word causing some sort of snafu, but if you're running into trouble take the time to type it all out. I don't know why, and it's caused a lot of confusion with my users, but it does seem to make a difference. (I haven't tested with Notepad or Wordpad, so perhaps that would work ok.)

Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags