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

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

Re: Drawing Template Repeat Region

You could also use the exists function to check if a part has the "DRAWING_TABLE" parameter:

 

if exists("asm_mbr_drawing_table")
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
else
ZZ = "Oops"
endif

Re: Drawing Template Repeat Region

@bwudtke, did you succeed in showing "DRAWING_TABLE" in your repeat region?

Re: Drawing Template Repeat Region

@HamsterNL   Thank you so much for the time on this.  This helps alot, I have gotten the table to work, but still am having problems with the filter to remove anything that does NOT have the "DRAWING_TABLE" parameter.   I have tried adding a filter, &asm.mbr.param == DRAWING_TABLE, but it removes everything from the table.  Thoughts?

Re: Drawing Template Repeat Region

Try

 

&asm.mbr.param.name == DRAWING_TABLE

Re: Drawing Template Repeat Region

That did not seem to work. 😕  I have attached my drawing file if this helps at all.  

Re: Drawing Template Repeat Region

Can you show an actual generic part number and describe what you are doing?

Re: Drawing Template Repeat Region

All I am trying to do is filter a "simple" repeat region to only show parts that have the parameter "DRAWING_TABLE."  The file above has a sheet metal part BOM with two bulk items that contain the parameter "DRAWING_TABLE" and the sheetmetal file part in the BOM does not include the parameter.  I just have to get the correct table filter to only show parts that have "DRAWING_TABLE" included and am having a hard time.

 

Filter:

&asm.mbr.param == DRAWING_TABLE 

or

&asm.mbr.param.name == DRAWING_TABLE 

doesn't work

Re: Drawing Template Repeat Region

@bwudtke,

 

I have taken a quick look at your example.

 

To make it work, I had to edit the Repeat Region Relations, and remove the top half where a "LOST SYMBOL" was being used.

 

So the Relations are now:

 

/************************************************************
if exists ("asm_mbr_ptc_material_PTC_MATERIAL_NAME") /*if item is a material
if search (asm_mbr_ptc_material_ptc_material_name,"SI") == 1 /* global material?
KPS = asm_mbr_ptc_material_kpsmat
SDMO = asm_mbr_ptc_material_ptc_material_description
thick = asm_mbr_ptc_material_thickness
mm = 'mm '
endif
endif

/*************************************************************************

/* START - part name

IF search (asm_mbr_name,"_") == 0 /*Search for an underscore in the part name
partnum = asm_mbr_name
ELSE
partnum = extract(asm_mbr_name,1, search (asm_mbr_name,"_") - 1) /* If name has an underscore, then truncate the Part No.
endif

/* END - part name

 

Then I modified the Filter to:

 

&asm.mbr.param.name == DRAWING_TABLE

 

The table then showed only two entries B (the two bulk items)

Re: Drawing Template Repeat Region

@HamsterNL   This is what did it!!  Thank you so much!