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

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Repeat Relation Relation to skip over parameters that don't exist

Chris3
20-Turquoise

Repeat Relation Relation to skip over parameters that don't exist

One of my vendors puts their part number in a parameter called BOMINFO. I am trying to write a relation that uses that parameter for the BOM Number in the case that the parameter exists. The parameter only exists in files that I have received from this supplier. Otherwise, my BOM Number is just my Pro/E file name. The vendor has periods in their part number so I can't name the Pro/E file with their BOM Number.

The problem I am running into is that whenever the parameter does not exist in a component I get a blank value for my BOM number (I am assuming it's a NULL). Below is my relation in which I tried to test whether or not the parameter exists, but this still leaves me with a NULL value for parts that don't have the parameter.

if asm_mbr_bominfo != "NULL"
BOM_NUM = asm_mbr_bominfo
else
BOM_NUM = asm_mbr_name
endif

Anyone have any ideas how I can check if the parameter exists without returning a NULL Value when it doesn't in other components?

Christopher Rees - Mechanical Engineer - ISR Systems
UTC AEROSPACE SYSTEMS
100 Wooster Heights Rd, Danbury, CT 06810 U.S.A.
Tel: +1 203 797 5490 Fax: +1 203 797 6637
christopher.rees@utas.utc.com<">mailto:christopher.rees@utas.utc.com> www.utcaerospacesystems.com
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
wbowling
3-Visitor
(To:Chris3)

Hi Christopher,



In your repeat-region relations add the following…



IF exists("asm_mbr_bominfo")

PARTNUM = asm_mbr_bominfo

ELSE

PARTNUM = asm_mbr_name

ENDIF



For this to work, you need to add an entry in your table that gets the value of this relation. Put the following in your repeat-region table in one of the cells.



&rpt.rel.partnum







W.C. (Bill) Bowling
Aerojet Rocketdyne
Mechanical Design (MS: FB24)
Chris3
20-Turquoise
(To:Chris3)

Awesome. This worked. Thanks so much. I missed the "exists" function.

Christopher Rees - Mechanical Engineer - ISR Systems
UTC AEROSPACE SYSTEMS
100 Wooster Heights Rd, Danbury, CT 06810 U.S.A.
Top Tags