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

Repeat Region Relations work in one drawing table but not the other

Highlighted
Visitor

Repeat Region Relations work in one drawing table but not the other

I have Repeat Region Relations that work in one drawing table but if I put that table in another drawing of the same model, the relations no longer work. Here's the relations:

RELSHOWNAME= ASM_MBR_NAME

IF EXISTS ("ASM_MBR_DESC")

   IF ASM_MBR_DESC == "FLEX BODY"

       RELSHOWNAME =ASM_MBR_D_UB_DWG

   ENDIF

   IF ASM_MBR_DESC == "NON-FLEX BODY"

      RELSHOWNAME = ASM_MBR_D_LB_DWG

   ENDIF

ENDIF

If my new table has a column with ASM_MBR_D_LB_DWG or ASM_MBR_D_UB_DWG the relations work, but if I remove the columns, the relations quit working and I see this in the message window: There are errors regenerating repeat region relations.

Anyone know what's going on here??

m

16 REPLIES 16

Re: Repeat Region Relations work in one drawing table but not the other

I'm no repeat region relations expert, but are those two parameters present at the bottom of the relations window?  If not, add them and see if that does it.

I remember trying to add a relation that substituted A/R for the qty on bulk items and I had to manually add parameters in the relations window, even repeat region parameter like rpt_qty. See this thread:

Bulk Item Qty in Repeat Region

--
Doug Schaefer | Experienced Mechanical Design Engineer
LinkedIn

Re: Repeat Region Relations work in one drawing table but not the other

if I add those columns, the parameters are added to the relations parameters as type unknown, but the relations work as intended. If I then remove those columns, the parameters in the relations editor are gone as well. If I create the parameters in the relations editor, as type string, they remain type string and do not change with the relations, but they do appear in the table. I guess I forgot to mention that when the relations do not work, the two table cells I'm trying to change with conditional statements are empty.

Re: Repeat Region Relations work in one drawing table but not the other

Here is a great article about repeat regions.

http://support.ptc.com/cs/cs_26/howto/dwt_no2d/dwt_no2d.htm

This was referenced at the end of this string:

Re: Family Table of Charted Dimensioin in an Assembly Drawing

Re: Repeat Region Relations work in one drawing table but not the other

Dale,

I don't see what that has to do with my question?

Re: Repeat Region Relations work in one drawing table but not the other

Did you try to reboot and the problem go away? 

Seriously, I tried to to replicate your problem and managed to get weird results that might be a clue as to how to solve your issue:

I don't have a file set with your parameters, but I definitely got into some trouble when I deleted a parameter that was used in this repeat region relation:

if exists("ASM_MBR_FILE_TYPE")

  TYPE_STRING = "** Present"

else

  TYPE_STRING = "Missing"

endif

(the drawing has a repeat-region table with a column that has the entry "&rpt.rel.TYPE_STRING"; which will either show "** Present" if the component listed in the particular row has the parameter "FILE_TYPE", or it will show "Missing" if it doesn't - note my test assembly had a mix of both types of parts).

When I intentionally deleted the ASM_MBR_FILE_TYPE parameter in the repeat region relation ui's local parameter list, and then regenerated the drawing, the relation no longer worked (as expected - every row was filled with "Missing").

When I then tried to recreate the parameter ASM_MBR_FILE_TYPE, either by temporarily creating the extra table column which showed the component parameter "FILE_TYPE", or simply by manually adding a Real Number parameter "ASM_MBR_FILE_TYPE" to the local parameter list, the the relation no longer worked (all rows were now showing "** Present".  Also note that the parameter ASM_MBR_FILE_TYPE did change to the "Unknown" type.

But what actually worked, incredibly,  was simply going into the actual text of the relations (lines 01-05 above) and making a non-change - for example, retyping the word "endif" on line 05.  After that, the relation prescribed in the very same looking 5 lines actually worked...

Maybe the same thing is happening to you in some way - try making a similar non-change in your relations of the repeat region in the new drawing and see if that helps...  I doubt it because I don't actually get the message "There are errors regenerating repeat region relations", but who knows???

Re: Repeat Region Relations work in one drawing table but not the other

Try the following code and make sure you've got &rpt.rel.RELSHOWNAME in one of the repeat region table fields.

Untested:

IF EXISTS("ASM_MBR_D_UB_DWG") & EXISTS("ASM_MBR_D_LB_DWG")

DESCDUMMY=ASM_MBR_DESC

ELSE

DESCDUMMY="N/A"

ENDIF

IF EXISTS("ASM_MBR_DESC")

IF DESCDUMMY=="FLEX BODY"

  RELSHOWNAME=ASM_MBR_D_UB_DWG

ELSE

IF DESCDUMMY=="NON-FLEX BODY"

  RELSHOWNAME=ASM_MBR_D_LB_DWG

ELSE

  RELSHOWNAME=ASM_MBR_NAME

ENDIF

ENDIF

ENDIF


Re: Repeat Region Relations work in one drawing table but not the other

Mike,

I spent some time on testing the problem in CR2 M070.

1.] IF EXISTS ("ASM_MBR_DESC") command does not work in repeat region relation

2.] all assembly members must contain the same set of parameters, this means:

DESC

D_UB_DWG

D_LB_DWG

2.] all parameters used in repeat region relation must be included in repeat region cell

4.] to "hide" unwanted parameters I set their height to 0.01 mm

rr1a.png

rr2.png

5.] you can use attached table, if you fulfil the above rules

MH


Martin Hanák

Re: Repeat Region Relations work in one drawing table but not the other

Doug Schaefer‌ is correct, the parameters referenced in your relations need to be listed in the parameters section.  (Remember this Doug: Re: Bulk Item Qty in Repeat Region)

The required parameters will automatically be added to the repeat region parameters section  if you add them to one of the repeat region columns (like MartinHanak‌ mentioned), or you can just manually add them to the repeat region parameters section yourself.  They do NOT need to be in a (hidden) column of the table.

Finally, "IF EXISTS" does work in repeat region relations (and this is the only place it works).  See this discussion for a sample: Relations in drawing BOM

Let me know if you need screenshots demonstrating all of this. 

Re: Repeat Region Relations work in one drawing table but not the other

I am publishing what I have learned .

Step 1.

Create table, define repeat region and put parameter into it.

step1.png

Step 2.

Open relations dialog box, define parameters used in relations and enter relations.

step2.png

See attached table.

MH


Martin Hanák
Announcements
LiveWorx Call For Papers Happening Now!