BOM Quantity Override

Ok. So i have a model that is used to represent Oil. It has all its
parameters set so that it shows in the BOM but the model is empty so
that it doesn't appear in the assemly.
I need to put 1.5 quarts in the motor. ie... the qty column in the
bill needs to say 1.5
Can I override a cell in repeat region to show as 1.5?
How would you suggest I do this? I can't exacly put 1/2 a model in
the assembly, and creating a new part number with the description "1.5
quarts of Oil" isn't an option.
Thanks
Reply to
Aggrevated
Loading thread data ...
Ok. So i have a model that is used to represent Oil. It has all its parameters set so that it shows in the BOM but the model is empty so that it doesn't appear in the assemly.
I need to put 1.5 quarts in the motor. ie... the qty column in the bill needs to say 1.5
Can I override a cell in repeat region to show as 1.5?
How would you suggest I do this? I can't exacly put 1/2 a model in the assembly, and creating a new part number with the description "1.5 quarts of Oil" isn't an option.
Thanks You do this with 'Table>Repeat Region>Relations'. In relations, you set up some condition, such as "if asm.membr.partname==WHATEVERITIS qnty="1.5" else qnty=rpt.qty
Then, you edit your repeat region parameters so that, instead of the quantity being reported by rpt.qty, it is reported by rpt.rel.qnty, so, for the quantity field, you have to edit the report parameters. Or, you can do 'Switch Symbols', highlight the report parameter text and do "Properties" and edit it manually.
You can do a lot of stuff with relations, such as base the value of qnty on file type such as setting it to AR by doing an "if asm.membr.type=="bulk item" or setting a parameter in the models that can be evaluated different ways to treat assemblies, manufactured parts, COTS parts, bulk items, specs, test or assembly procedures differently, for example, calling out the qnty="REF" instead of a number.
Most of this kind of stuff is evaluated at the beginning of the relations. If you are having trouble with getting it to work, do all of your "if" statements first, before doing any "else" statement, i.e., only one "else" after all the "if"s have been evalutated.
This is a fairly old technique. I wouldn't be surprised if you could find it on the PTC website Knowledge Base.
David Janes
Reply to
Janes
Ok. Problem. My part numbers are "strings" because my client likes to use strange characters (+,- &) and junk in their part numbers. Is this still possible?
Reply to
Aggrevated
OK. So the string part evaluates fine, however I get:
IF asm_mbr_part_no =3D=3D "30681" qnty =3D "1.5" else qnty =3D rpt.qty =01error=02Invalid number in relation. endif
If i take out the else part it works fine. it doesn't like the qnty =3D rpt.qty part
I tried qnty =3D itos(rpt.qty) but that doesn't work.
funny that I had to use asm_mbr_part_no insteasd of asm.mbr.part_no like I would expect (parameter is part_no) but it won't take rpt_qty says it's invalid
what am I doing wrong?
Reply to
Aggrevated
Ok... I got it.
The problem was that because I took the rpt.qty out of the repeat region and replaced it with qnty, Pro/e doesn't automatically calcluate it. I guess that makes sense. so I had to physically create a local parameter in the sheet called rpt_qty to force the program to calculate the value even though the repeat region doesn't contain it.
esoteric pile of garbage.
Reply to
Aggrevated
OK. So the string part evaluates fine, however I get:
IF asm_mbr_part_no == "30681" qnty = "1.5" else qnty = rpt.qty errorInvalid number in relation. endif
If i take out the else part it works fine. it doesn't like the qnty = rpt.qty part
I tried qnty = itos(rpt.qty) but that doesn't work.
funny that I had to use asm_mbr_part_no insteasd of asm.mbr.part_no like I would expect (parameter is part_no) but it won't take rpt_qty says it's invalid
what am I doing wrong?
You know, I was going to check this when I got to work today because there are syntax or syntax-related issues with getting this to work correctly. For example, I'm thinking that maybe the rpt.qty after the equals sign in the else statement might need to be enclosed in quotes as well. I'll try to remember to check.
Otherwise, why are you using asm_mbr_part_no? Isn't this a parameter? Why not use asm_mbr_part_name, the file name of the part/component? This is automatically a string 'parameter'.
David Janes
Reply to
Janes
Well our file names are like 30681_thingy_with_widget.prt and the part number is just saved as a parameter (part_no) for referencing on the drw sheet. That's why I didn't use asm_mbr_name. If I had used asm_mbr_name then I would have had to typed the whole file name and I'm too lazy for that.
This is what finally worked:
IF asm_mbr_part_no == "30681" qnty = "1.5" ELSE qnty = rpt_qty ENDIF
Notes: 1) rpt_qty has to be set up as a local parameter in the "Repeat Region -> Relations -> Local Parameters" section. 2) "Part_No" is a string parameter in the individual parts. 3) The Quantity field in the BOM is changed from &rpt.qty to &qnty
Works like a champ.
Interesting that rpt.qty is a string and not an integer. It works out well I guess, but odd none the less.
Reply to
Aggrevated

Site Timeline

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.