Skip to main content
1-Visitor
Aug 23, 2013 3:13 PM UTC
Question

relations ~ adding one to define a raw material number.

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
    Aug 23, 2013 9:24 PM UTC

    Thanks Ben Loosi for helping me with this.

    Translate
    1-Visitor
    Aug 26, 2013 5:57 PM UTC

    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

    Translate
    TomU
    23-Emerald IV
    Aug 27, 2013 12:35 PM UTC
    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


    Translate