×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Bulk Item Quantity Repeat Region Relation - Creo 5.0

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. glasses

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

The simple way is to use
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

I did find the following in my notes:

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

(OP)
Thanks for your reply...

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

That's why I said use ELSE IF.

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

If these parts were true bulk items, you could use the parameter asm.mbr.type == "BULK" as a filter.

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

(OP)
Thanks for your replies!

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

The easy way if they are all bulk items:

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

Instead of the nested IF-ElSE, you could do:

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

(OP)
Thanks Ben...I'll keep in mind next time!

Stay safe!

MannyV

RE: Bulk Item Quantity Repeat Region Relation - Creo 5.0

Interesting - never seen an OR statement work like that. Usually it's limited to bit-wise combinations of integers or boolean variables.

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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Resources

Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Design for Additive Manufacturing (DfAM)
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a part’s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close