Bulk Item Quantity Repeat Region Relation - Creo 5.0
Bulk Item Quantity Repeat Region Relation - Creo 5.0
(OP)
Hi,
I am new to this forum and this is my first post. Please go easy on me.
I'm trying to place "AR" to several items in my BOM table. I have been successful placing "AR" in one of the items, but I can't seem to put "AR" in the other items.

I've typed in the relations editors several combinations, but with no success. I've used the following:
IF asm_mbr_part_number == "EA E-00NS"
This part number worked in my BOM table, & shows "AR". How can I add the following part numbers, "8117A25" and "93725K76", to the editor so that these PNs show "AR" as well.
Thanks!
MannyV
I am new to this forum and this is my first post. Please go easy on me.

I'm trying to place "AR" to several items in my BOM table. I have been successful placing "AR" in one of the items, but I can't seem to put "AR" in the other items.

I've typed in the relations editors several combinations, but with no success. I've used the following:
IF asm_mbr_part_number == "EA E-00NS"
This part number worked in my BOM table, & shows "AR". How can I add the following part numbers, "8117A25" and "93725K76", to the editor so that these PNs show "AR" as well.
Thanks!
MannyV
RE: Bulk Item Quantity Repeat Region Relation - Creo 5.0
ELSE IF asm_mbr_part_number == "****"
QTY1 = "A/R"
ELSE IF asm_mbr_part_number == "****"
QTY1 = "A/R"
for as many items (filling the "****" as required) as you have.
Alternatively, if the parts have some part parameter that indicates it is bulk material, use that.
I think it would be asm_mbr_part_param; something like that. It's been a while and I am missing my reference, but if you use the relation editor you can walk through to get the syntax from that.
I expect you need to use
IF exists(asm_mbr_part_param)
IF asm_mbr_part_param_bulk == True (or "Yes", if a string was used rather than boolean)
QTY1 = "A/R"
ELSE
QTY1 = rpt_qty
ENDIF
ENDIF
The exists() function is used to avoid failing for parts that don't have "bulk" (or whatever name you choose) as a parameter. The Repeat Regions fail silently rather than popping up error messages, so it may not be required, but I think if it is allowed in Repeat Region Relations that "exists()" is a good test. I'm 99.9% sure it's acceptable there. I believe I have used it to build tables to determine which parts are missing parameters.
RE: Bulk Item Quantity Repeat Region Relation - Creo 5.0
For example, let's say you have the following parameters set inside your 3D models (accessed by going into Tools>Parameters):
Description = "Bushing, Size #2, Stainless Steel, #150"
Part_Number = "123456-111"
Designers_Name = "Martin"
To access these parameters in your BOM, you'd use the parameters:
asm.mbr.description
asm.mbr.part_number
asm.mbr.designers_name
Apparently for "==" and "!=" one can also use "\*" as part of the string as a wildcard. It may not work for "<" and ">" evaluations.
RE: Bulk Item Quantity Repeat Region Relation - Creo 5.0
Here's what happens when I try to add the other part numbers..
I followed what's in a Pro/E User's guide...
And yes..these parts are "bulk" items, but they are actual models of bulk items that I modeled so that it shows up in my drawing. The only time I use "bulk" item is glues, adhesives, etc...
I've also tried to add each part separately in the editor.
IF asm_mbr_part_number == "9402T61"
IF asm_mbr_part_number == "8117A25"
IF asm_mbr_part_number == "93725K76"
I get the same error message...
RE: Bulk Item Quantity Repeat Region Relation - Creo 5.0
You cannot use a comma separated list and cannot use sequential IF statements without matching ENDIF for each one in the relations.
The section showing the comma separation is for "By Rule" in the FILTER section, not in the RELATION section.
The Relations are a separate programming language; the filters are directives. It's a subtle difference that PTC might have done better to improve - the writer of that book did not do a good job.
RE: Bulk Item Quantity Repeat Region Relation - Creo 5.0
Since you have created actual parts, I would add a YES/NO parameter to each 'bulk' part, and use that as a filter for the relations.
RE: Bulk Item Quantity Repeat Region Relation - Creo 5.0
https://community.ptc.com/t5/3D-Part-Assembly-Desi...
https://www.eng-tips.com/viewthread.cfm?qid=360550
https://sharptechdesign.com/Tutorials/ProE_Fundame...
(I saw references indicating it might be "BULK-ITEM", so one or the other should work.)
RE: Bulk Item Quantity Repeat Region Relation - Creo 5.0
Finally, figured it out...
I nested all the IF statements together, and it finally worked!
I did put the ENDIF statement after each "QTY = rpt_qty" statement, but it didn't work. Then I placed the three ENDIF statements at the end, & it worked!
Thank you!
MannyV
RE: Bulk Item Quantity Repeat Region Relation - Creo 5.0
IF asm_mbr_type == "BULK ITEM"
quantity = "AR"
ELSE
quantity = rpt_qty
ENDIF
I have this in my start template BOM table for all drawings.
Nothing to edit later.
"Wildfires are dangerous, hard to control, and economically catastrophic."
Ben Loosli
RE: Bulk Item Quantity Repeat Region Relation - Creo 5.0
If asm_mbr_part_number == "93725K76"|"8117A25"|"9402T61"
QTY1 = "AR"
ENDIF
The | is an OR operator.
There is a limitation of 80 characters in a line.
"Wildfires are dangerous, hard to control, and economically catastrophic."
Ben Loosli
RE: Bulk Item Quantity Repeat Region Relation - Creo 5.0
Stay safe!
MannyV
RE: Bulk Item Quantity Repeat Region Relation - Creo 5.0
I've seen the "&" operator used for concatenation, but not "|" for strings?
C and Python use OR operator on strings as if they are FALSE if they are null/empty.
I could expect it to be used as a match in the filter section directives.