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

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Relations in drawing BOM

JeffHoracek
1-Newbie

Relations in drawing BOM

All,


WF4.0, M270 Windchill 9.1 m010


I've been tasked with coming up with a new drawing format for our company. So far, so good. Now I'm working on the BOM table and need some relations in it. I don't deal with relations to much, so I'm not real comfortable with it an trying to figure it out through trial an error is time consuming.


Here is the situation. My description coloumn can have one of two different parameters used in this field. All of the files created within the last few years use a parameter called "title1". We've been migrating quite a bit of legacy data into Windchill, these are older files where the Title1 parameter was not popluated, but a parameter called "part_name" is used. So, basically, I want to create a relation to see if the part_name paramter was used, if it was not, use the title1 parameter. I've spent the better part of a day working on this and have been unsuccessful. Populating the Title1 parameter is not an option in these older files as when these files were migrated, they were place in a Released lifecycle state. Modifying the files would now require a revision. My relations in my repeat region are:


if exists ("drawing_no")


part_number = asm_mbr_drawing_no


elsepart_number = asm_mbr_part_no


endif


else


ENDIF
IF ASM_MBR_TYPE=="BULK ITEM"


quantity=asm_mbr_bulk_report_quantity


ELSEquantity=rpt_qty


endif


Jeff Horacek

Engineering Design Change Specialist

Global CAD Administrator

STERIS Corporation

5900 Heisley Rd.

Mentor, OH 44060


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 REPLY 1
TomU
23-Emerald IV
(To:JeffHoracek)

Jeff,

The "IF EXISTS" statement needs to check for the entire parameter name as seen by the relations interface.

IF EXISTS("asm_mbr_drawing_no")
PART_NUMBER = asm_mbr_drawing_no
ELSE
PART_NUMBER = asm_mbr_part_no
ENDIF

I would actually recommend you check for the existence of ALL parameters, unless you are 100% certain they will always be there. The relations statements are executed from top to bottom for EACH row. If there is a failure in one of the statements, none of the following statements will be evaluated for that particular row of the repeat region.

PART_NUMBER = "NOT SET"
IF EXISTS("asm_mbr_drawing_no")
PART_NUMBER = asm_mbr_drawing_no
ELSE
IF EXISTS("asm_mbr_part_no")
PART_NUMBER = asm_mbr_part_no
ENDIF
ENDIF

Tom U.
Top Tags