Skip to main content
3-Newcomer
May 12, 2016 2:03 PM UTC
Solved

Filter Repeat Region by Two Conditions

Creo 3, M070

I'd like to use two conditions to filter a repeat region, can I do this?

What I mean is that I want to filter all assemblies out of my region except the ones with the parameter BOM_DISPLAY set to YES.  So, I'd like to display assemblies only if these two conditions are met:

&asm.mbr.type  == ASSEMBLY*

&asm.mbr.bom_display  == yes

But, I believe that if I put those tow things in the repeat region filters the only items I'll get are those assemblies.  I'd like to get all the parts too (except skeletons and parts where BOM_DISPLAY is set to no).

So, what I want is:

&asm.mbr.type  != SKELETON*

&asm.mbr.bom_display  != no


&asm.mbr.type  != ASSEMBLY*

EXCEPT where:

&asm.mbr.type  == ASSEMBLY*

AND:

&asm.mbr.bom_display  == yes

Of course, that's not going to work.   How can I accomplish all of this?

May 13, 2016 10:33 AM UTC

Doug,

I created test data in CR2 M070 (repeat_region.zip). Unzip it, investigate it and apply it to your real data .

__rel_par.png

In Relations dialog box I had to create two highlighted parameters manually (as String parameters).

MH

26 replies

May 12, 2016 4:36 PM UTC

Try:

&asm.mbr.type == ASSEMBLY, PART

&asm.mbr.bom_display == YES

3-Newcomer
May 12, 2016 6:50 PM UTC

A nuance that I failed to mention is that not all parts or assys have the BOM_DISPLAY parameter.  Right now, only the parts that I want to exclude do.

The more I think about this, I'm thinking that rules to exclude skeletons and the parts that I never what to show (parts of a purchased sub assy) plus then manually filtering the rest makes the most sense in this case.

May 12, 2016 9:26 PM UTC

Doug Schaefer‌,

I would suggest using repeat region relations to set a parameter that can be used by the filter to determine whether or not to show each row.  Take a look at this discussion:  REPEAT REGION FILTERS

May 13, 2016 1:05 AM UTC

Maybe you need second BOM

May 13, 2016 10:33 AM UTC

Doug,

I created test data in CR2 M070 (repeat_region.zip). Unzip it, investigate it and apply it to your real data .

__rel_par.png

In Relations dialog box I had to create two highlighted parameters manually (as String parameters).

MH

3-Newcomer
May 13, 2016 5:51 PM UTC

I'm marking this as correct even though I've already gone with manual filtering for my application.  This does look like it would do exactly as I want, though.

May 13, 2016 1:50 PM UTC

like this?:

11.gif

May 14, 2016 3:30 AM UTC

Very good~!!!

If the component is not too much

Like this:

Asm create a parameter: bom_display=no

Filter:&asm.mbr.bom_display !=no

This is faster.

Mar 4, 2019 4:19 PM UTC

Hi Doug,

 

I have a similar situation, but I need to use an OR condition in my filter. 

I want my BOM to include all assembly members (&rpt.level < 2) OR any sub-component with a custom parameter (&asm.mbr.BOM_DISPLAY == YES)

 

Do you know how I can accomplish this? Thank you!

 

Spencer

Mar 4, 2019 5:08 PM UTC

Please disregard - I was way over-complicating it. I just discovered the Flat/Rec Item button in the repeat region menu. It does exactly what I need.