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.

bulk items

we assign it with an internal part number/spec then create a blank part with that number.
assign any parameters needed for the bom in the part
part is added to the assembly
a bom relation is written to change bom qty to AR (as required) if part number appears
example of bom relation

/*GET FIRST THREE CHARACTERS OF PART NAME
name_check=EXTRACT(bom_name,1,3)

/*CHANGE QUANTITY TO AR IF PART CODE INDICATES BULK ITEM
IF name_check=="119"
bom_qty="AR"
ENDIF
IF name_check=="M76"
bom_name="M76MWPC207A9"
bom_qty="AR"
ENDIF
/*SPECIAL CASES
IF bom_name=="M23053-5-109-0"
bom_qty="AR"
ENDIF

/* REMEMBER TO CHANGE Qty. TO
/* rpt.rel.bom_qty (rpt > rel > USER DEFINED > type in "bom_qty")

our internal number is like a telephone number, that is why we gleen the first three positions.
for MS specs, we search the name directly as shown under the special cases clause.

hope this helps
 
Last edited:
we assign it with an internal part number/spec then create a blank part with that number.
assign any parameters needed for the bom in the part
part is added to the assembly
a bom relation is written to change bom qty to AR (as required) if part number appears
example of bom relation

/*GET FIRST THREE CHARACTERS OF PART NAME
name_check=EXTRACT(bom_name,1,3)

/*CHANGE QUANTITY TO AR IF PART CODE INDICATES BULK ITEM
IF name_check=="119"
bom_qty="AR"
ENDIF
IF name_check=="M76"
bom_name="M76MWPC207A9"
bom_qty="AR"
ENDIF
/*SPECIAL CASES
IF bom_name=="M23053-5-109-0"
bom_qty="AR"
ENDIF

/* REMEMBER TO CHANGE Qty. TO
/* rpt.rel.bom_qty (rpt > rel > USER DEFINED > type in "bom_qty")

our internal number is like a telephone number, that is why we gleen the first three positions.
for MS specs, we search the name directly as shown under the special cases clause.

hope this helps

How does that work without an ELSE statement?

Here is what I use:

If asm_mbr_pn == "REF"
my_qty = "-"
Else
If asm_mbr_pn == "12345"
my_qty = "REF"
Else
if asm_mbr_pn == "45678"
my_qty = "REF"
Else
if asm_mbr_pn == "9101112"
my_qty = "A/R"
Else
my_qty = rpt_qty
EndIf
EndIf
EndIf
EndIf
/*** Replace "rpt.qty" with "&rpt.rel.my_qty" in repeat region.

This uses my parameter in the part "pn", which is the part number of the part.
 
same difference.
I take one item and send it thru multiple clauses with individual checks
your example takes one item and loops thru an individual clause that has multiple checks
Pro/Cons - editing and understanding especially when multiple people are modifying.
I cut/paste a chunk, you need to remember to add an additional endif at the end somewhere. Rookies often forget that part.
 
We use the "bulk" part type in Creo. This is a part file with no geometry, only relations and parameters. Shows up as a special icon in the model tree.

In our repeat regions, we add the following relations:

IF asm_mbr_type == "BULK ITEM"
QTY = "AR"
ELSE
QTY = rpt_qty
ENDIF​

You need to add the parameter "asm_mbr_type" to the relations dialog. Seems dumb, since it's a system parameter, but that's what you need to do. Expand the "Local parameters" area, click plus and type in "asm_mbr_type" and make it a string parameter.

Lastly, change the QTY field from &rpt.qty to &rpt.rel.qty.

Now bulk parts will show up as AR in the QTY column.
 

Sponsor

Articles From 3DCAD World

Back
Top