Skip to main content
6-Contributor
June 10, 2022
Question

DRAWING BOM TABLE USING REPEAT REGIONS AND RELATIONS

  • June 10, 2022
  • 4 replies
  • 6033 views

I am wanting to create two descriptions on the model for use on a new parts book template I am creating:

  • Description (used on shop floor drawings)
  • Part Book Description (Given to the customer with minimum detail )

I would like the BOM table to look at model and use this logic:

 

If model has a “Description” & “Part Book Description”  use “Part Book Description”

If model has a “Description” & No “Part Book Description” use “Description”

 

I have written this IF statement but it does not seem to work. Am i doing something wrong

 

 

IF EXISTS("asm_mbr_partbook")
DESCRIPTION = asm_mbr_partbook
ELSE
DESCRIPTION = asm_mbr_description
ENDIF

 

Any help appreciated

 

thanks

4 replies

Dale_Rosema
23-Emerald III
23-Emerald III
June 10, 2022

I had a similar situation where I wanted to change the quantity (not the description). See if this thread helps:

 

https://community.ptc.com/t5/3D-Part-Assembly-Design/1-2-of-a-part/m-p/100428

 

You may have to redefine what goes in the description similar to what I had to with the quantity. Then set the results of your If/Then statement to be the value of that new parameter.

kdirth
21-Topaz I
21-Topaz I
June 10, 2022

From Creo Help:  Example: “If exists ()” Syntax in Repeat Region (ptc.com)

 

The syntax for IF EXISTS should be:

 

DESCRIPTION = asm_mbr_description

IF EXISTS("asm_mbr_partbook")

DESCRIPTION = asm_mbr_partbook

ENDIF

There is always more to learn.
6-Contributor
June 10, 2022

This does not seem to work. Is the description which is in the model parameters a constant which is not able to be a variable when using the relations?

 

6-Contributor
June 10, 2022

Changing it to rpt.rel in the repeat region worked 😀

 

14-Alexandrite
June 10, 2022

We do something similar if I'm understanding your question correctly but not within one table.  We manufacture industrial electrical enclosures that may or may not have cutouts required in the door.  During regeneration of the model one of the questions is "Is your door custom?".  The assembly level parameter is DOOR_CUSTOM (YES or  NO).

 

In the drawing, we have 2 BOM tables on top of each other in the same spot.  One for when the door is custom and one for when the door is stock.  The difference in these two tables is the door assembly is either "Flat" or "Recursive".  Each table is then placed on it's own layer and we use the drawing program to show or hide the appropriate BOM table based off the value of the DOOR_CUSTOM parameter value.

 

IF DOOR_CUSTOM:3 == YES
SET STATE DOOR_CUSTOM_YES
ELSE
SET STATE DOOR_CUSTOM_NO
ENDIF

 

I think you could do the same thing.  Have two different tables using the two different table report parameters and then use the drawing program to show or hide the appropriate table based off the value of an assembly level parameter.

6-Contributor
October 5, 2022

I have come back to this a few months later now this logic is not working at all. In the description box on my drawing it now isn't showing anything.

23-Emerald III
October 5, 2022

Double check that your repeat region relations are still there and your table is calling out the repeat region relation and that you have the original description parameter in the part file to start with.