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

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

Repeat Region in WF4 m220

pperry
1-Visitor

Repeat Region in WF4 m220

If I create a repeat region to show quantity and Part Name:

3 11111_12345678-003

1 11111_12345678-008

1 11111_12345678-007

1 11111_12345678-006

1 11111_12345678-005

1 11111_12345678-004

1 11111_12345678-002

1 11111_12345678-001

I have tried to write several different relations to strip the 11111_ from assembly member name. I am using the extract function but cannot seem to get the relation right.

final_name = extract("asm_mbr_name",6,10)

gives me the table:

10 (and no member name). I am using asm.mbr.user_defined as final_name to generate table. I had one relation that returned 10 12345678-003 but have lost that relation. I know this is a simple fix.

TIA.

Patrick Perry BAE systems


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.
ACCEPTED SOLUTION

Accepted Solutions
MartinHanak
24-Ruby III
(To:pperry)

Patrick,

you have to follow this procedure (see uploaded data):

1.]

Create Repeat Region and put &asm.mbr.name into its column.

2.]

Define relation.

final_name=extract(asm_mbr_name,7,6)

These two steps are saved in 11111_drw.drw.4 drawing.

3.]

Replace &asm.mbr.name with &rpt.rel.final_name.

This third step is saved in 11111_drw.drw.5 drawing.

Martin Hanak


Martin Hanák

View solution in original post

6 REPLIES 6
MartinHanak
24-Ruby III
(To:pperry)

Patrick,

you have to define Relation in Repeat Region and then put &rpt.rel.final_name into Repeat Region cell.

I uploaded test data...

Martin Hanak


Martin Hanák

i have done that and the table becomes one line. One of the issues I have is my relation does not want to accept asm_member_name as a valid attribue. If I use the final_name = asm_mbr_name the relations show and error and will not move forward. The error indicates tha asm_mbr_name (or asm.mbr.name) is an invalid symbol.

MartinHanak
24-Ruby III
(To:pperry)

Patrick,

you can find the answer inside my test files (created in WF4). Download repeat_region.zip and do some investigation:

> check Repeat Region properties

> check Repeat Region relations

Martin Hanak


Martin Hanák

Martin,


The problem is we do not want to show the asm_mbr_name. If I create a relation final_name=extract(asm_mbr_name,7,6) without the column with asm_mbr_name, the relation is invalid. I could reduce the column with to 1 character and you would not see the as_mbr_name. Is there a way to hide the column completely?

MartinHanak
24-Ruby III
(To:pperry)

Patrick,

you have to follow this procedure (see uploaded data):

1.]

Create Repeat Region and put &asm.mbr.name into its column.

2.]

Define relation.

final_name=extract(asm_mbr_name,7,6)

These two steps are saved in 11111_drw.drw.4 drawing.

3.]

Replace &asm.mbr.name with &rpt.rel.final_name.

This third step is saved in 11111_drw.drw.5 drawing.

Martin Hanak


Martin Hanák

That did it. I was trying to create the table with the relation in one step. That realy seems strange to me. Thanks for all your help.

Patrick Perry

Announcements


Top Tags