BOM Quantity Override

Discussion in 'Pro/Engineer & Creo Elements/Pro' started by Aggrevated, Jan 4, 2008.

  1. Aggrevated

    Aggrevated Guest

    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
     
    Aggrevated, Jan 4, 2008
    #1
  2. Aggrevated

    Janes Guest

    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
     
    Janes, Jan 5, 2008
    #2
  3. Aggrevated

    Aggrevated Guest

    Well I'll tell you that the first place I go for help is the "help"
    menus. Which are about as useful as tits on a boar. Then I come
    here.

    I'll give this a shot. I'm a pro/e newbie with no one to learn from
    but you guys, so anyting too complicated not covered in the
    "help" (which has been pretty much everything) is news to me.
     
    Aggrevated, Jan 7, 2008
    #3
  4. Aggrevated

    Aggrevated Guest

    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?
     
    Aggrevated, Jan 7, 2008
    #4
  5. Aggrevated

    Aggrevated Guest

    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?
     
    Aggrevated, Jan 7, 2008
    #5
  6. Aggrevated

    Aggrevated Guest

    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.
     
    Aggrevated, Jan 7, 2008
    #6
  7. Aggrevated

    Janes Guest

    esoteric pile of garbage.
    Tip of the iceberg, MUCH more fun to come!


    David Janes
     
    Janes, Jan 7, 2008
    #7
  8. Aggrevated

    Janes Guest

    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
     
    Janes, Jan 8, 2008
    #8
  9. Aggrevated

    Aggrevated Guest

    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.
     
    Aggrevated, Jan 10, 2008
    #9
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.