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.
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.
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...
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.
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.
It looks like it is possible to increment a repeat region parameter with each successive row's processing.
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.