Skip to main content
1-Visitor
August 14, 2019
Solved

Drawing Template Repeat Region

  • August 14, 2019
  • 2 replies
  • 9552 views

With a Drawing Template, I want to create a repeat region on drawing from the model, looking for any parameter that is named for example below :

SPEC_G_1245 and show in table as G-1245

SPEC_111345864XX and show in table as 111345864XX

 

Each parameter will have  value and description that will be output as a column.  Should look like picture attached if outputted correctly.  I am not very familiar with table relations but this would benefit us a lot as we are trying to move more to parameter based notes for drawings.

 

Best answer by HamsterNL

If DRAWING_TABLE is a parameter defined in a regular part, then take these steps:

 

asm...

mbr...

User Defined

DRAWING_TABLE

 

It will show as "&asm.mbr.DRAWING_TABLE"

 

But if you have added Relations to a Repeat Region, and DRAWING_TABLE is defined in those relations, then take these steps:

 

rpt...

rel...

User Defined

DRAWING_TABLE

 

It will show as "&rpt.rel.DRAWING_TABLE"

 

 

For your info, here are the Repeat Region Relations I made in a test part. The test part has a paramet name "DRAWING_TABLE" with a value of "SPEC_G_1245". The Repeat Region Relations create a new parameter called ZZ which I have added to the BOM. Notice the way that you'll need to reference the DRAWING_TABLE parameter (you'll have to replace all dots "." with underscores "_")

 

XXX = asm_mbr_drawing_table

Y = "SPEC_"

XX =extract(XXX,string_length(y)+1,string_length(xxx)-string_length(y))

Z = search(XX,"_")

if Z == 0
/* The string does not contain an underscore
ZZ = XX
else
/* The string has an underscore
ZZ = extract(XX,1,Z-1)+"-"+extract(XX,Z+1,string_length(XX)-Z)
endif

2 replies

23-Emerald III
August 14, 2019

Two thoughts come to mind.

The easiest method would be to create a parameter called draw_spec (or something) and use that for your column in the repeat region. Then you can format the spec name exactly how you want it in your BOM.

Second method would be a repeat region relation where you look for the string beginning with 'SPEC' and then capture the rest of the string for your BOM display. Might need to also parse the string for the underscore character and replace it with a dash.

bwudtke1-VisitorAuthor
1-Visitor
August 14, 2019

We are looking to do the second method you stated.  But  I am not sure the correct way to even call out the relation,  do you think you could help out with that?

23-Emerald III
August 14, 2019

The stripping of the spec part I could probably work out easily. replacing the underscore with a dash may be a little more than repeat region relations can handle. The relation code can do it, put it gets messy, especially if the position of the underscore character is not consistent.

 

Option 1 is by far the easiest. What objections does your company have with adding a simple parameter to your files?

 

23-Emerald III
August 15, 2019

From your screenshot of the BOM, are these items added as bulk items into your assembly?

If they are, what is the parameter name you are using for the BOM table?

Like Hamster shows, the code gets convoluted if there is any deviation. Will it always be SPEC_X_######?

Stripping the SPEC_ is easy, as shown. Parsing the rest, unless a fixed format, is difficult.

 

I will repeat myself and say the easiest solution is to add a parameter for draw_spec to your files and use that in the BOM. If the spec is the partname, then put the relations in your file to generate the parameter for every part.

bwudtke1-VisitorAuthor
1-Visitor
August 15, 2019

I do find the option of adding a bulk item to the assembly a good idea, but the original thought was that we only would have to add a parameter that would always be "SPEC_#####"