Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

Help with Repeat Region Relations

ian.sylvester

New member
So I've been struggling with this, and finally broke down to ask for help. Sorry I know this topic comes up quite frequently but even after searching, I just can't get all the way there.


GOAL: Have my repeat region BOM in a drawing report "rpt.qty" for all parts except for bulk items, which I would like to report the part parameter "BOMQTY"


Region Relation:


IF asm_mbr_type=="BULK ITEM"


QUANTITY = rpt_asm_mbr_cparam_bomqty


ELSE


QUANTITY= rpt_qty


ENDIF


Region Local Parameters (All set as unkown, and left blank):


QUANTITY


ASM_MBR_TYPE


RPT_QTY





My bulk item part as the following parameter added:


BOMQTY (STRING, AR)


I then change the repeat region to rpt-->rel-->User Defined-->QUANTITY, but it shows as in the picture below.
smiley11.gif



I can get the table to report AR by setting QUANTITY="AR" in the relation, but I'd like to give people the option to enter quantities if , for example, they have a length of edge gasket.





View attachment 5589
 
This is one I use toreport a different quantity based upon part number. I show it as an example because I believe your syntax is incorrect.


If asm_mbr_pn == "23-3101"
my_qty = "50"
Else
If asm_mbr_pn == "23-3100"
my_qty = "REF"
Else
my_qty = rpt_qty
EndIf
EndIf

/*** Replace "rpt.qty" with "&rpt.rel.my_qty" in repeat region.


This does not require the addition of any parameters to the model or the drawing.
 
The syntax looks the same to me, you have another If statement due to the PN specificity.


If I do what you're doing, and tell it QUANTITY = "AR" for bulk items, that works fine. I just want it to be flexible to allow people to enter a value or AR as they desire.


What am I missing?
 
I have dots, you have underscores.


The added parameter also requires an ampersand (&)


&rpt.rel.my_qty
 

Sponsor

Back
Top