Skip to main content
16-Pearl
October 29, 2024
Question

Relations in BOM

  • October 29, 2024
  • 2 replies
  • 2812 views

Hi,

 

I have a parameter called cage_code. I want the blank cage code in the bom column to read 96906.

 

I have another parameter called part_number. I want part_number MS51959-15's cage code to read 96906, which is currently blank.

 

I saw a tutorial on Youtube that showed the following relation that worked:

 

IF asm_mbr_part_number=="MS51957-15"
asm_cage_code="96906"
ELSE
ENDIF

This looks pretty straight forward and looks like it will work. Why does it not?

Do I need to do something to the cage code in the bom that reads &asm.mbr.cage_code? I tried something like &rel.asm.mbr.cage_code. That does not work.

 

Please help.

 

WayneF

2 replies

23-Emerald III
October 29, 2024

The way I have handled this in the past is add a new repeat region relation parameter for the cage code, in my example, I use "new_cage_code".

I change the column in the table from asm.mbr.cage_code to rpt.rel.new_cage_code

 

new_cage_code=asm_mbr_cage_code

if asm_mbr_name=="MS51957-15"
new_cage_code="96906"
else
new_cage_code=asm_mbr_cage_code

endif

 

wfalco16-PearlAuthor
16-Pearl
October 29, 2024

wfalco_0-1730203974034.png

 

wfalco_1-1730204032066.png

What am I doing wrong?

23-Emerald III
October 29, 2024

There is always something that snags these up! 

Does that part file actually have a cage_code parameter, sometimes thats the snag, and I sure don't remember how to fix that...

 

Unrelated:

Also, I noticed,  I used asm_mbr_name=="MS51957-15"  but when I looked at your setup again, you used asm_mbr_part_number=="MS51957-15"

So try changing to your relation to IF asm_mbr_part_number=="MS51957-15"

23-Emerald III
October 29, 2024

Why not set the cage code in that part file?

Do you have the cage_code parameter in your drawing file?

wfalco16-PearlAuthor
16-Pearl
October 29, 2024

I cant change the part. I don't have permission. I am back dooring this. The drawing? I don't know how that would work.

23-Emerald III
October 29, 2024

I got this to work.

 

Drawing repeat relations are:

IF asm_mbr_pdm_number=="MS9518-01"
asm_cage_code="96906"
else
if asm_mbr_pdm_number=="MS9518-03"
asm_cage_code="96907"
else
asm_cage_code=asm_mbr_cage_code
ENDIF
endif

 

BenLoosli_0-1730224041068.png

MS9518-01 has a blank cage code, -02 has cage code 96545.