cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

DRAWING BOM TABLE USING REPEAT REGIONS AND RELATIONS

HP_10107372
6-Contributor

DRAWING BOM TABLE USING REPEAT REGIONS AND RELATIONS

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

17 REPLIES 17
Dale_Rosema
23-Emerald III
(To:HP_10107372)

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.

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 in Creo.
HP_10107372
6-Contributor
(To:kdirth)

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?

 

StephenW
23-Emerald III
(To:HP_10107372)

No, you can't "modify" a part parameter directly with a repeat region relation.

@kdirth  is making a repeat region parameter called "description" and initially sets it equal to the part parameter (also named description).

In your table, you would change the field for the description from &asm.mbr.DESCRIPTION to &rpt.rel.description.

EDIT; don't listen to me...it's been too long since I have done table relations, I've got it all confused1!!

double edit: maybe i remember correctly sometimes!!!

HP_10107372
6-Contributor
(To:StephenW)

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

 

StephenW
23-Emerald III
(To:HP_10107372)

Every once in a while I confuse myself!!! I confused myself thinking I was confused, but actually I was just confused about being confused!

As of Creo 7.0, DESCRIPTION is a hard coded parameter equal to the NAME in the file.

 

This caused us some pains because we were using DESCRIPTION as one of our parameters for controlling the description in our title block and BOM tables.


There is always more to learn in Creo.
Dale_Rosema
23-Emerald III
(To:kdirth)

That is good to know, we do the same thing here.

What did you end up doing? A massive parameter change on all you models?

We used DESCRIPTION and DESCRIPTION2  for title blocks and DESCRIPTION for BOM tables.  Now we use DESCRIPTION1 and DESCRIPTION2 in the title block.  DESCRIPTION is used in the BOM because the admin couldn't get DESCRIPTION1 to work in the repeat region. 

 

An automated update of DESCRIPTION1 would be great, but we are just updating it as files are revised.  BOM's are being being updated at revisions.  The biggest headache is when NAME for the file does not match the old DESCRIPTION and the admin is doing the rename as needed to get the correct text in the BOM.


There is always more to learn in Creo.
TomU
23-Emerald IV
(To:kdirth)


@kdirth wrote:

As of Creo 7.0, DESCRIPTION is a hard coded parameter equal to the NAME in the file.


Your company may have implemented something but this is definitely not 'out of the box' from PTC for Creo or Windchill.

 

The only two automatically created parameters in Creo Parametric are these:

TomU_0-1654872296393.png

 

Anything else is coming from your (custom) start parts, your Windchill configuration, or some custom automation.

 

@kdirth Can you point us to some official notice about this change?  I just don't believe PTC would make such a customer-affecting change.  What happens when an old model that has DESCRIPTION as a user defined parameter (and relations built around it) is opened in Creo 7.0?  The value is quietly changed to the NAME of the file?

And I would guess that most of Creo models out in the world have DESCRIPTION as a parameter (albeit based on my personal observation that every company I worked for had it in their start parts)

TomU
23-Emerald IV
(To:pausob)

I have Creo 7.0, 8.0, and 9.0 all installed and configured with Windchill 12.1.  What's being described does not exist.  This has to be something special someone has configured at @kdirth's company...

kdirth
21-Topaz I
(To:TomU)

I am going by what my admin has said.  We upgraded to Creo 7.0 and Windchill 12 last year.  Since then this has been an issue.  I am sure the admin worked with the reseller on this.  Maybe the reseller is also confused.


There is always more to learn in Creo.
TomU
23-Emerald IV
(To:kdirth)

I'm more than willing to talk to your admin.  Just have them send me a private message.

mkajdan
14-Alexandrite
(To:HP_10107372)

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.

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.

StephenW
23-Emerald III
(To:HP_10107372)

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.

 

Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags