Skip to main content
1-Visitor
August 23, 2013
Question

relations ~ adding one to define a raw material number.

  • August 23, 2013
  • 3 replies
  • 1000 views

Help, I am trying to assign a raw material number based on a tubes height, width and thickness through IF statements. Any suggestions?

    3 replies

    1-Visitor
    August 23, 2013

    Thanks Ben Loosi for helping me with this.

    1-Visitor
    August 26, 2013

    Ben,


    Thanks again for the relation assistance, I have provided an example below of you're work.


    For rectangular tubing:


    IF HEIGHT == 7.00 & WIDTH == 4.00 & WALL_THICKNESS == .25
    RAW_MAT_NUMBER = "910-020R"


    ENDIF



    For square tubing:


    IF HEIGHT == 4.00 & WIDTH == 4.00 & WALL_THICKNESS == .25
    RAW_MAT_NUMBER = "910-021R"
    ENDIF



    Jason

    23-Emerald IV
    August 27, 2013
    Jason,

    If you need to check for lots of different conditions, you may find it easier to nest your statements. It's also a good idea to clear the parameter value. You don't want an incorrect value left if none of the cases are valid.

    RAW_MAT_NUMBER = "
    IF THICKNESS == 0.25
    IF WIDTH == 4.00
    IF HEIGHT == 4.00
    RAW_MAT_NUMBER = "910-021R"
    ENDIF
    IF HEIGHT == 7.00
    RAW_MAT_NUMBER = "910-020R"
    ENDIF
    ENDIF
    ENDIF