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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

BOM table relations to compare model name

Danish_Naeem
2-Guest

BOM table relations to compare model name

Hi All,

 

I have a BOM table with custom BOM Balloon parameter called BOMREF. In BOM relations, I am comparing asm_mbr_name to the typed in string value and then adjusting value of BOMREF parameter using if statement. See screen shot below for one of the assembly.

 

Danish_Naeem_1-1575475747718.png

 

I want to automate this process so that I don't have to type the string value every time I change the assembly. It should automatically pick it up from file name.

 

For manufactured parts, the file name is always of the format XXXGYYY.prt/asm where XXX and YYY are unique numerical numbers or integers. Example file name would be 421G196.asm.

 

My idea is to write relation which looks at the format of file name and if the file name is as per the format above then it should assign BOMREF a value of "M" + "AAA". where "AAA" is a sequential number starting from 001 and going up to rpt.index in the BOM table.

 

Any idea on how to do it is highly appreciated.

 

Thank you in advance.

 

Regards

 

Danish

 

5 REPLIES 5
Warren_M
6-Contributor
(To:Danish_Naeem)

If I read this correctly, you want to automate the BOM on the drawings.
Basically what I have done is to open the template directory and find the inlbs_part_solid start part. Once open, go to tools, parameters, and add the other parameters you want to see. Then save it. Same goes for the Assembly inlbs_asm_design and save. I am attaching a screen shot of the parameters I use in the parts and assemblies.
Once you have them in, open you start format in the template directory,(whatever your company uses XXX_a.frm, XXX_b.frm...) and in the appropriate boxes, type in text lines (for Drawn_by) &Drawn_by (for Date) &date, etc. and save.
Go back to Creo and create a test part. Fill in the "Value" column in the parameters and save. Then create a drawing of the test part and add the format to see if it works as planned.
Now when you create a new part, the parameters "Value" column will need to be filled in. When you create a drawing, the title information will be filled in automatically. The line that needs to be filled in at the part level is the "Description" line in the parameters on the parts. When you create a drawing of the assembly, it should populate the BOM as well as fill in the title block.
It's been a while since I have had to do this so I'm not sure if I have missed anything. I'm sure there are others that can help as well.
Good luck - Warren

Hi WMoffatt,

 

I think you are talking about the title block on the dwg which I already have sorted. It is doing what you are describing. 

 

My problem does not relate to title block on dwg rather it relates to BOM Balloons on dwg. In BOM Balloon table relations I want to get rid of manually typing the file name to associate a custom BOM Balloon number to it. I want a relation where it looks at the file name format of the assembly member and automatically assign a custom BOM Balloon to it and then keep incrementing the  BOM Balloon numbers for next part in the list until file name stops satisfying the format requirement.

 

I hope that makes it clear.

 

Danish

TomU
23-Emerald IV
(To:Danish_Naeem)

Parsing the file name is easy enough, but I'm not sure how you keep track of the next available index number.  Repeat region relations are evaluated once per table row with no consideration of what came before or what's coming next.  You might be able to increment a local repeat region parameter up once per row, but I have my doubts.  It would take some testing...

Hi,

I am almost sure that requested functionality is not available OOTB.

Simpliest solution follows:

1.] get component list (eg. save contents of model tree)

2.] launch external application

      > input file = component list

      > output file = repeat region relations

3.] put contents of output file into repeat region relations editor window

 

The external application will perform the logic you described.


Martin Hanák
TomU
23-Emerald IV
(To:Danish_Naeem)

It looks like it is possible to increment a repeat region parameter with each successive row's processing.

 

TomU_0-1575662775564.png

 

Based on that test, it should be possible to increment the number only for certain rows and then return something else for other rows.

 

I think the only challenge will be figuring out how to make sure the number is always reset to zero (or one) on the first row.

Top Tags