Skip to main content
1-Visitor
March 31, 2016
Solved

Filter Repeat region relation

  • March 31, 2016
  • 3 replies
  • 14896 views

Hi All,

Need your help to resolve my problem related to Repeat region. Request you to read my problem description carefully and provide solution as I am stuck in my project because of this.

Problem Description : I have created assembly drawing. Assembly has 5 components in it. All components are instances of their generic parts and instances are selected through "Lookup instance". Each generic components have large number of instances. Each generic has family table with 3 Parameter columns, value of which is used to compare and select appropriate instance to be used in assembly. For example, let us say, these three parameters are "a","b" & "c". Each parameter/column has some repetitive values. I want to create a repeat region table such that, the resultant table display a list of instances, which has same value of parameter "a". (Refer below image for required outcome).

ProQuery.JPG

It will be OK, if we do not show column for "b" and "c", but table should filter out the instances with same values of parameter "a".

Thanks in advance.

Bhavin


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.
Best answer by TomU

I think I may have a possible workaround.  For this to work, your repeat region needs to be of the entire assembly, not just one model's family table (although you could certainly filter it so it only displays data from one model family.)

Repeat region relations can't directly read assembly level parameters, but they can read component parameters.  You could create a component level parameter that reflects the assembly value (ex. NOMINAL_DIA).  Do this for each instance used.

Now go the repeat region, add this component parameter, and then use it to set the value of a repeat region parameter.

Finally, add a repeat region filter based on the value of the repeat region parameter "HIDE".

After doing this, I can change the value of the assembly level parameter "NOMINAL_DIA", and immediately the repeat region table will update to only show instance where "AAA" equals it.  I believe this is what you're trying to accomplish.

3 replies

bparikh-21-VisitorAuthor
1-Visitor
April 1, 2016

Hi Martin,

Thanks for providing Links.

However, My question was requesting for one step ahead of that. I am looking to set the "Filter" and/or "Relation" in Repeat Region Table, so that my table display only instances, having particular value of particular parameter. Not only that, but also I need that parameter value should be fetched from assembly.

For example, if somehow I can execute following expression, may serve the purpose.

&fam.inst.param.value==NOMINAL_DIA

Where, NOMINAL_DIA is the parameter in assembly in which Family instance is used.

In short, we need to associate part parameter with assembly parameter in (Repeat) Region Context.

It would be great, if you can provide some solution(s) to this.

Regards,

Bhavin

24-Ruby III
April 1, 2016

Hi,

&fam.inst.param.value==PARAMETER_NAME filter expression is not allowed ... see http://help.ptc.com/creo_hc/creo30_pma_hc/usascii/#page/pma/detail/About_Adding_Filters.html

MH

bparikh-21-VisitorAuthor
1-Visitor
April 4, 2016

Yes Guys,

  I think you got my problem correct this time and hope to have some solution or work around to make it happen.

However, as I mentioned, Assembly picks up the instance by matching certain parameter values using lookup_instance approach, for e.g. NOMINAL_DIA, LEDGE and RING_TYPE. Once the appropriate instance is assembled in the assembly, I just need to show the list of available instances of that component, in assembly drawing for that particular value of NOMINAL_DIA,

   In Assembly, corresponding parameters are driven by layout. Hence once the user enters the value of these parameters in layout and regenerate the assembly, it performs the procedure as mentioned above.

Thanks and appreciate it.

Bhavin

1-Visitor
April 4, 2016

Ok, I was gonna create a vid, but i am not familiar with the lookup_instance approach and with how to make those params driven by layout. So, i will not be able to build a structure of models and drawings similar to yours. I don't think i can help you unless you build it yourself and upload it here or explain in details how to go about it.

I wonder what kind of licence does that all require. I might not even have that at work.

Do you know what i mean when something is not being associative? It simply looses the ability to use regeneration/update.

Are you familiar with the include functionality in assembly mode?

bparikh-21-VisitorAuthor
1-Visitor
April 4, 2016

Hi,

I would say, forget about lookup_inst and Layout things. To simplify, I have an instance assembled in assembly with particular values of NOMINAL_DIA, LEDGE and RING_TYPE. Drawing table should represent the list of instances associated with that particular NOMINAL_DIA, irrespective of values of LEDGE and RING_TYPE.

I hope this explanation may have simplified problem description.

However, I am not familiar with include functionality in assembly. If you have something for me to refer, to understand that functionality, will be great.

Also, I am working on Creo 2.0 (M100).

Thanks,

Bhavin

bparikh-21-VisitorAuthor
1-Visitor
April 5, 2016

Hi,

If anyone have any solution to my problem, please help me.

Thanks,

Bhavin

1-Visitor
April 5, 2016

The non-associative solution to your problem is building a nested mapkey such as one described here How to create a drawing with same name as active model with Mapkeys but a mapkey of much bigger size.

A mapkey that runs maybe a couple or more external scripts, that can parse strings, delete, create and write to files, Pick any coding language that can compile to exe. The one i prefer is Autohotkey.

The OS script part of the mapkey can run external files for example script.exe and wait for that script to finish it's job using /wait option, then move on.

START /WAIT c:\script.exe

Be aware that these external scripts won't know where your Working Directory is, so this solution requires files to be passed between for example TEMP dir and Working Dir using the regular OS script type of mapkeys

Purposes of these external scripts could be for instance to get the value of a specific parameter, to parse the family table data to figure out what instances do have that specific value, to build the mapkey that includes all the parts that have been figured out by previous mapkeys... things like that.

The solutions should take days to be build this way, maybe even weeks if you don't have any prior coding experience.

Good luck.