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

Drawing Template Repeat Region

SOLVED
Highlighted
Regular Member

Drawing Template Repeat Region

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.

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Drawing Template Repeat Region

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

View solution in original post

19 REPLIES 19

Re: Drawing Template Repeat Region

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.

Re: Drawing Template Repeat Region

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?

Re: Drawing Template Repeat Region

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?

 

Re: Drawing Template Repeat Region

Text manipulation is indeed messy...

 

Just take a look at the code below. It will assume that your text has a maximum of one underscore in your description.

 

XXX = "SPEC_G_1245" /* "SPEC_111345864XX "

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

Re: Drawing Template Repeat Region

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.

Re: Drawing Template Repeat Region

The idea is that the parameters are in the model that call out the designated specification that the part needs.  With this table Im just trying to output all the specs.  The problem is that we have multiple different spec numbers, so i thought adding "SPEC_" would help search for that with a relation.  If you look at the picture in the post above it shows what the output should be.

 

Here is a walkthrough of what I would like the relations to do..

1. search for any parameter in model with contains "SPEC_"

        Create new parameter removing "SPEC_" 

             Then, after "SPEC_" is removed, search for "_",

                       Then, Create new parameter to replace "_" with "-"

Re: Drawing Template Repeat Region

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_#####"

Re: Drawing Template Repeat Region

I think we all need to be on the same page.

 

In your description of your problem (challenge), it sounds like the parts themselves have different parameters (the name of the parameter itself is different). The parts should have the same parameter, but the value can be different for all those parts.

 

When you are creating a Repeat Region, you are adding a parameter to your table. The Repeat Region will show the value of that parameter. So a Repeat Region can show the values of the parameter "draw_spec" of all the parts in your assembly.

 

As soon as you can show that "draw_spec" paramter in a Repeat Region, you can add the text manipulation in my previous post to strip "SPEC_" from the value of the parameter and replace one underscore with a minus-sign.

 

You could also add a Filter to your Repeat Region and only show parts or assembies which have the "draw_spec" parameter. So if only 4 parts have a "draw_spec" parameter, only those 4 parts will be shown in your Repeat Region.

 

HTH!

Re: Drawing Template Repeat Region

I have created a BOM, but i am having a hard time reporting the parameter "DRAWING_TABLE" to repeat region.   How would this be reported?  &rpt.rel.drawing_table   ?    That is not working for me.