Community email notifications are disrupted. While we are working to resolve, please check on your favorite boards regularly to keep up with your conversations and new topics.
My company wants to introduce standard bomballoons values for fasteners.
e.g. A hex_nut_m6 is always number 301.
Now I want to make a repeat region that reads the rpt.index value for all components, but if a component has a parameter called pos_nr, it should obtain that value.
See screenshot, modified in Paint….
I assume this should be possible with relations in repeat regions but I cannot get it to work.
Anybody out there who can help me?
Solved! Go to Solution.
Hi,
use repeat region relation:
---
if exists("asm_mbr_POS_NR")
myindex = asm_mbr_POS_NR
else
myindex = rpt_index
endif
Repeat region cell contents:
---
&rpt.rel.myindex
MH
Try:
if string_length(asm_mbr_name)>9
if extract(asm_mbr_name,1,10) == "hex_nut_m6"
Myindex = "301"
else
Myindex = rpt_index
endif
else
Myindex = rpt_index
endif
Then in your repeat region instead of this:
&rpt.index
You will need this:
&rpt.rel.MyIndex
Looks like I may have missed the second part of the question in regards to pos_nr.
Try:
if string_length(asm_mbr_name)>9 & exists("asm_mbr_pos_nr")
if extract(asm_mbr_name,1,10) == "hex_nut_m6"
Myindex = "301"
else
Myindex = rpt_index
endif
else
Myindex = rpt_index
endif
Then in your repeat region instead of this:
&rpt.index
You will need this:
&rpt.rel.MyIndex
Are you putting the parameter 'pos_nr' in all of your standard hardware item parts?
Does 'pos_nr' change with the part? Hex_nut_m6 is 301, hex_nut_m8 is 302, hex_bolt_m6x35 is 303, etc.
Do you hardware items have unique part numbers?
Not sure what the length of the asm_mbr_name has to do with anything. Too general of a variable to be useful.
string_length(asm_mbr_name)>9 is a validation check. Without this check if the extract function tries to extract for a component that has less than the number of character you are trying to extract then it will return a NULL. The NULL doesn't report as NULL though it comes back as a blank for that and everything after it which leads the user confused as to what is going on.
I made the assumption that the part file name is hex_nut_m6. If that is not the case then Ruben can obviously adjust as needed.
Hi,
use repeat region relation:
---
if exists("asm_mbr_POS_NR")
myindex = asm_mbr_POS_NR
else
myindex = rpt_index
endif
Repeat region cell contents:
---
&rpt.rel.myindex
MH
Do you have any insight on what might prevent this relation from working. I added the following relation:
IF EXISTS ("asm_mbr_item_number")
table_item = asm_mbr_item_number
ELSE
table_item = rpt_index
ENDIF
And I reported &rpt.rel.table_item in the table column.
But the repeat region did not substitute the assembly member ITEM_NUMBER parameter for rpt_index.
I then tried adding the parameter ASM_MBR_ITEM_NUMBER in the local parameters below the relations but this resulted in all the table items reflecting the last assigned ITEM_NUMBER parameter. In other words - The first item was 305, the next item was 304, the 3rd item was 303 (as assigned by ITEM_NUMBER) then all subsequent items were also 303 instead of resuming with 1 and automatically indexing from there.