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

Filter Repeat Region by Two Conditions

SOLVED
Topaz II

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?

--
Doug Schaefer | Experienced Mechanical Design Engineer
LinkedIn
1 ACCEPTED SOLUTION

Accepted Solutions

Re: Filter Repeat Region by Two Conditions

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


Martin Hanák

View solution in original post

24 REPLIES 24

Re: Filter Repeat Region by Two Conditions

Try:

&asm.mbr.type == ASSEMBLY, PART

&asm.mbr.bom_display == YES

Re: Filter Repeat Region by Two Conditions

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.

--
Doug Schaefer | Experienced Mechanical Design Engineer
LinkedIn

Re: Filter Repeat Region by Two Conditions

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

Re: Filter Repeat Region by Two Conditions

Maybe you need second BOM

Re: Filter Repeat Region by Two Conditions

I agree with Uminn's suggestion -

In the table relations try:

if exists("asm_mbr_bom_display")

   test = asm_mbr_type  == ASSEMBLY* & asm_mbr_bom_display  == yes

endif


And then the filter is &rpt.rel.test ==TRUE (or False .. I've lost track)


(edited to use underscores instead of periods.

For those dealing with Repeat Regions, underscores replace periods as field separators in relations, but not in filters or in repeat region cells.

However, relations don't use the ampersand prefix that is required in cells and in filters.)

Re: Filter Repeat Region by Two Conditions

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


Martin Hanák

View solution in original post

Re: Filter Repeat Region by Two Conditions

Another option, if you have it, is to use Modelcheck to add the parameter to the models that don't already it. The filters above would then work.

Re: Filter Repeat Region by Two Conditions

like this?:

11.gif

Re: Filter Repeat Region by Two Conditions

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.

--
Doug Schaefer | Experienced Mechanical Design Engineer
LinkedIn