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

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

Assembly name in BOM table relation

dveljkovic
6-Contributor

Assembly name in BOM table relation

I want to add portion of main assembly name into repeat region for each member:

 

 

FIXTURE=extract(asm_name,8,5)
DETAIL=FIXTURE + '-' + itos(rpt_index)

 

 

For parts it works as expected: 01-01-1, 01-01-2, etc

The problem is that "asm_name" in repeat region relations returns value for sub-assembly name which exists in main assembly: S_160-5, S_160-6.

dveljkovic_1-1611598345497.png

If I place "asm.name" under QTY column everything is as expected.

DET column gets values from relation: rpt.rel.DETAIL

What am I doing wrong?

7 REPLIES 7


@dveljkovic wrote:

I want to add portion of main assembly name into repeat region for each member:

 

 

FIXTURE=extract(asm_name,8,5)
DETAIL=FIXTURE + '-' + itos(rpt_index)

 

 

For parts it works as expected: 01-01-1, 01-01-2, etc

The problem is that "asm_name" in repeat region relations returns value for sub-assembly name which exists in main assembly: S_160-5, S_160-6.

dveljkovic_1-1611598345497.png

If I place "asm.name" under QTY column everything is as expected.

DET column gets values from relation: rpt.rel.DETAIL

What am I doing wrong?


Hi,

please upload your data.


Martin Hanák

I have found a "workaround", as usual with Cre(p)o.

I made new column and placed asm.name in that column and then I called asm_name in relation for first column. I will "hide" asm column afterwards because its not needed to be seen on this table.

Another way to accomplish this would be to add asm_name to the list of local parameters within the repeat region. It's a better way to calculate the value without having to deal with shown/hidden columns. When calculating values for BOM attributes within a repeat region, the relations need access to the thing they're trying to calculate. 

 

  1. Edit the relations of your repeat region
  2. Expand the list of local parameters
  3. Click the plus icon to add a new parameter to the repeat region

 

 

Ty

dveljkovic
6-Contributor
(To:Tdaugherty)

If I do as you say, asm_name value has to be entered manually which I am trying to avoid.

I have weird issue here. Parameter ASSEMBLY_NAME showed up (I did not place it there) and it is for gripper assembly (in this case) and last column in BOM shows my main assembly name (cyan square on the left).

You can see that last row is getting info from ASSEMBLY_NAME parameter instead of asm_name in my relation. All others are ok.

dveljkovic_3-1611675452796.png

Then I made new table from zero and I added asm.name in column and then removed it. So, now relation works as expected.

 

dveljkovic_4-1611675795908.png

But now, I cannot use custom balloon on this new table. For some reason it does not work.

I used rpt.rel.DETAIL and asm.mbr.DEV for my BOM balloon values and for second table it does not work but for the first one in works.

Have to continue on following post ...

 
 
 

 

 

dveljkovic
6-Contributor
(To:dveljkovic)

dveljkovic_0-1611676144501.png

These are BOM balloons for first table.

Hi,

 

I put together a small dataset to explain what I was talking about yesterday.

 

Here is a simple BOM Table for a small assembly:

 

Tdaugherty_0-1611765737948.png

 

 

Now, let’s add some requirements. These are very similar to a recent customer I was dealing with.

 

  • If the component is a make part, show the material in the material column.
  • If the component is a buy part, show the word “Purchase” in the material column.
  • Don’t show the source column

 

At this point, I typically replace the parameter in the Material column (PTC_MATERIAL_NAME) with one I can manipulate (TABLE_MAT). Here is the new table and screenshot of the relations. Notice that the parameters being displayed in columns are added to the list of local parameters in the repeat region.

 

Tdaugherty_1-1611765737955.png

 

 

According to my requirements, I need to compute the value in the Material column based on whether or not I’m going to manufacture the component or buy it. A likely candidate for this would the Source parameter. My customer doesn’t want Source in the BOM so I need to get a little creative. This is where I would need to add source to the list of local parameters in the repeat region. It’s not a column so it doesn’t appear by default. I need to add it myself so that I can use it in my code. See the steps in my previous response. Here’s a new picture:

 

Tdaugherty_2-1611765737958.png

 

Now, I can add the code that computes the value of TABLE_MAT based on the value of SOURCE. Notice that the Material column is populated properly for my buy part but the make part is blank. This is because my make part calculation is calling ASM_MBR_PTC_MATERIAL_PTC_MATERIAL_NAME but the relations don’t have access to that attribute. It’s not a column, so I need to add it to the list of local parameters. This is where things get a little weird…

 

Notes:

  • This is quick prototype code that isn’t handling some exceptions.
  • I would normally use a user defined parameter here to get around the upcoming behavior.

 

Tdaugherty_3-1611765737961.png

 

A little earlier I mentioned that if an attribute is needed for relations and isn’t shown in a column, it needs to be added to the local parameters. The way that you would “convert” a parameter from the repeat region to the relations is to replace the “.” With “_”. A column reporting PTC_MATERIAL_NAME would look like this: asm.mbr.ptc.material.ptc.material.name. If we convert for use in relations, you get this: asm_mbr_ptc_material_ptc_material_name. If you try adding that to the local parameters, you’ll violate the character limit. What?!

 

Another way to add the attribute to the parameters is to add the column back. Adding a column also adds the local parameter. This fixes my Material (table_mat) column but look what happens:

 

Tdaugherty_4-1611765737964.png

 

Creo can’t add the actual parameter (asm_mbr_ptc_material_ptc_material_name) because it’s too long. It seems like there are some built in mappings to deal with this when it comes to PTC parameters(maybe others). Notice that adding the column added the attribute “_RPTSYM48”. This may explain why you’re seeing some odd behavior. In my case, the attribute that got added for me fixes my table:

 

Tdaugherty_5-1611765737965.png

 

I can even delete the column to the right and it still works because the _rptsym48 parameter still exists:

 

Tdaugherty_6-1611765737965.png

 

If I delete _rptsym48, my table breaks again:

 

Tdaugherty_7-1611765737966.png

 

 

 

There are some odd things happening here but I think there are some things to take away:

 

  • If a parameter is being used in relations, it needs to be shown as a column or it needs to be added to the local parameters in the repeat region.
  • Be careful when writing relations in repeat regions. Converting the parameter names properly is key. If you have a parameter for assembly name in all of your parts, the column should probably be set to show asm.mbr.asm_name. I’m wondering if the attribute you chose instead is leading to some odd additions to the local parameters. If a part level attribute doesn’t exist, you’ll probably need to add a second repeat region that shows only assemblies and use relations from there to calculate DETAIL.
  • Using user defined parameters for calculation will lead to less confusion when adding local parameters.
  • It might be simpler to add more intelligence to the naming convention of your parts rather than computing it in a table.
  • It might be simpler to show the rpt.index and use default ballooning.

 

I don’t know all of your requirements here so forgive my ignorance. It looks to me like you probably design automation and you’re trying to set up a controls components list table. We do the same thing so I felt like doing a little bit more digging on this one. It’s always tough bridging the gap between ME and CE and these drawings are a good way of doing that. In my experience, and what we do, I will say that keeping the table simple is better. Use the out of the box stuff where you can. On our table, we have manual text column where we add “Controls Description”. The CEs can add info about what they want to call a component in their program. We balloon based on rpt.index with simple circle balloons and tell those guys to refer to the table for the rest of the information they need.

 

I hope this helps!

 

Ty

dveljkovic
6-Contributor
(To:Tdaugherty)

Thank you Ty for very detailed description!

I just came back to Creo. Last time I worked with Creo it was version #3. I am not newbie but last three years I worked in Inventor. And I am trying to recall everything I knew about Creo. Current version I am working is #5. I hoped, Creo would improve to be much user friendly as all these versions and years passed, but that is not the case. I did not hold the breath either.

I do not use PC as a type-writing machine. I automate everything that I can with my knowledge of programming and software I use.

What I am trying here is to make controls BOM table from where all controls component (switches, cylinders, light curtains, safety gates, etc.) are shown and then ballooned in view. I am using "make flexible" to change controls_desc parameter that resides inside each purchase components. This parameter is shown on BOM as a description of controls component function. BOM balloon for this table will show fixture number (ex. 01-01) and will add 01, 02, 03, etc. to the end of fixture number. This is why I need "asm_name" because I want to extract fixture number. I know that if parameter is not in BOM table (repeat region) I will not be able to use it. And this sucks big time. So, I decided to put asm.name in column and "hide" this column by setting column width to 0.001 and text size to 0.001. But, to my surprise, when I called asm_name in BOM relation, instead of main assembly name I got name of the subassembly that resides within main assembly which I did not expect, because if I wanted that outcome I would have used asm.mbr.name or something like that.

As for your comment about deleting column and everything worked afterwards, I had the same experience. BUT! When I brought this BOM table to new drawing for new assembly it failed again! So, now, I am using your approach of manually adding fixture number. It is not repetitive work so I am fine with it.

Here is how my controls BOM looks like:

Controls BOM tableControls BOM table

You can notice under ITEM column wrong naming in last row. This is because I am using asm_name in this case.

I did not see any "weird" parameter showing up in BOM table parameter list.

But I did notice this:

Error messageError message

Which I have no clue what is means.

I set my repeat region attributes like this:

Attributes.png

And I am able to even place balloons in view!

I think, there is a bug in Creo's code that causes relation to perform like above mentioned. I know that PTC crew thinks that this bug is more like a feature (to cause a problem when you least expect it) and not a real bug.

I do not mind Creo not having some capabilities, but I do hate when what's supposed to work as expected does not work and then I am wasting time to find work-around.

 

Top Tags