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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Defining repeat region and writing relations and filters

ptc-4287798
1-Visitor

Defining repeat region and writing relations and filters

Hi,

at work they decided to change current bom table. Now we have 5 columns: index, quantity, name, material and description. It's flat, no duplicate, sorting by name. Guys wants the table to have the same columns but that the parts of a subassemblies gets listed in the table but just one level down. Quantity of a part should only be listed once and the weld assembly shouldn't be splited into parts. Weld assemblies have unique name with "0" as the 6th symbol (xxxx-0xx). I've googled around but just can't find similar problem.

Ok, so the new table should look something like this:

# qty name description material

1 1 1234-123 Part1 Material1

2 2 1234-012 W_assy /

3 1 1234-234 Assy /

4 1 1234-234-1 A_part1 Material2

5 2 1234-234-2 A_part2 Material2

6 3 1234-121 Part2 Material1 <- this part is in main assembly and in subassembly 1234-234 but is listed only once

So, I started to play. I noticed that the rpt.level is populated only if recursive is selected with duplicates. Recursive is ok but duplicates isn't. This is my first problem. Is there some other option to populate the rpt.qty column?

Next, if I make a relation:

/*for excluding to low subassemblies (main assy is level 1, so we list up to level 3)

if rpt.level>=4

a=true

else

a=false

endif

and filter

&rpt.rel.a!=true

works fine if the recursive with rpt.level symbol in the table is selected which is not fine. I don't like to have rpt.level in the table, but without this symbol I can't access the level. Is there some other options to filter out to low elements.

So, if I make a relation:

/*for excluding weld assemblies parts but to keep weld assembly

if search(asm_mbr_name,"-0")==5 & rpt_level>=3 /*search(asm_mbr_name,"0")==6 didn't work so i change it to that

b=true

else

b=false

endif

and filter

&rpt.rel.b!=true

this is great but again, there must be rpt.level populated. I could write:

if if (search(asm_mbr_name,"-0"))==5 & asm_mbr_type==part

b=true

else

b=false

endif

and again, there must be asm.mbr.type in the table.

What do you suggest? Can I define my own table with let say rpt.rel.a, rpt.rel.b ... rpt.rel.e symbols and in relations rpt_rel_a=rpt_index and so on. But again there must be rel.index defined in the table. Can I create a table with all the table symbols and then rewrite the rpt.rel.a...rpt.rel.e in the table2?

Hope you guys (and gals) can help. You would make my weekend a lot better.

Thanks for your replys


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.
0 REPLIES 0
Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags