Skip to main content
1-Visitor
June 29, 2016
Question

Repeat Region question again

  • June 29, 2016
  • 6 replies
  • 8598 views

Hi. This time I have a repeat region in an assembly drawing with "asm.mbr.name" giving the filename of the parts and subassemblies in the drawing. Trouble is, I have several components that are family table versions of the parts, because the parts are stretchy, and will expand in assembly. The generic version is the way it's made and drawn, and the instance is the way it would look when expanded in assembly.

I was asked to do it this way so we wouldn't have lines overlapping. Trouble is, they want the table to show the part name of the generic, not this stretched version. In each case the cell displays, for example, "1234", "1235", etc for part names, but for 4 instances it's "1236_INASM", "1237_INASM", etc.

Does anyone know how I can override the value, or do some other trick to remove the "_INASM" off the end of the word?


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.

6 replies

10-Marble
June 29, 2016

Avoid modelling an "extra family instances" at all and use flexibility function in assembly mode to make your parts "stretchy".

24-Ruby III
June 29, 2016

Hi,

you can apply repeat region relations to analyze and transform asm_mbr_name into new parameter (eg. MYPAR) and replace asm.mbr.name with rpt.rel.MYPAR.

MH

1-Visitor
June 29, 2016

Do you know how I would do this? I mean, the exact syntax?

23-Emerald III
June 29, 2016
12-Amethyst
June 29, 2016

We do something similar to Ben and Martin in our start parts and drawing tables.

We use a model parameter called OPTIPARTNUM for the part number in the BOM and we use the following relations to remove everything in the model name from the "_" and beyond.

/* First set PART_NUM to be the model name

PART_NUM=REL_MODEL_NAME

/* Then search the PART_NUM parameter for "_" and set OPTIPARTNUM to be everything to the left of "_"

IF SEARCH(PART_NUM,"_")==0

OPTIPARTNUM=PART_NUM

ELSE

OPTIPARTNUM=EXTRACT(PART_NUM, 1, (SEARCH(PART_NUM,"_")-1))

ENDIF

2-Explorer
June 30, 2016

Agree with John Frankovich. Think this is very elegant solution...

12-Amethyst
June 30, 2016

We remove part of the part number for generics family tables as the all end in -ft, here is what we use

/*RELATION TO TRUNCATE THE FILE NAME TO FILL IN THE PARAMETER

tmp_prt_no=REL_MODEL_NAME()

PART_NUMBER=extract(tmp_prt_no,1,9)

the 1 in this case is where we start collecting the part number, the 9 is where we stop collecting the part number. Our par numbers are all the same length in characters. If you have different length part numbers then you would need to use the method John shows.

2-Explorer
June 30, 2016

In my opinion it´s better to to use John Frankovich‌ method immidiatly. It´s much more complex.

We can say: "-" is a divide mark that HAVE TO occur ONLY ONCE in  EACH FILE NAME.

Than you don´t have to care about how many letters your files have. It works everytime.

l´m using similar relation in my start parts.

File name is in the shape: project_number-drawing_number

kdirth
21-Topaz I
21-Topaz I
June 30, 2016

If you only need to change a couple of values to "stretch" your part, I would agree that Flexibility is the way to go.

Here is what I use for the rare occasion that I have to modify the BOM for an instance or as installed model:

CHANGING PART NUMBER IN BOM TABLE

  1. Select first cell in region column (e.g. cell below PART_NUMBER)
  2. Right click and select “Report Parameter” from menu.
  3. Select “rpt…” then “rel…” then “User Defined” from menus.
  4. Type “PRTNUM” for symbol text.
  5. Select ”Repeat Region” from menu.
  6. Select “Relations” from menu then select the table.
  7. Enter text to make change required and select OK/Done.
    • IF asm_mbr_name=="S12345_XXX"
    • PRTNUM="S12345"
    • ELSE
    • PRTNUM=asm_mbr_name
    • ENDIF
  8. Select “Update Tables” from menu.

I have heard there is a way to make one rule to cover all instances of names with an underscore, but do not know what it is.

There is always more to learn.
12-Amethyst
June 30, 2016

I haven't tried this in a repeat region relation, but I would assume it would work.

/* Search the asm_mbr_name for "_" and set PRTNUM to be everything to the left of "_"

IF SEARCH(asm_mbr_name,"_")==0

PRTNUM=asm_mbr_name

ELSE

PRTNUM=EXTRACT(asm_mbr_name, 1, (SEARCH(asm_mbr_name,"_")-1))

ENDIF

1-Visitor
July 6, 2016

Thanks everyone for your help. For various reasons I think I will in future go with the flexible model version of parts, rather than use a family table instance simply for this purpose. There are other occasions where we use family tables and we want to display the name of the instance, rather than the generic, or some truncated version of the instance name.

By the way, I found that the repeat region parameter "&asm.mbr.top_generic.name" gives the generic name - no relation needed. When there is no family table it gives the part name.