cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

relations ~ adding one to define a raw material number.

jason.webb
1-Newbie

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 3

Thanks Ben Loosi for helping me with this.

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

TomU
23-Emerald IV
(To:jason.webb)

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


Announcements
Business Continuity with Creo: Learn more about it here.

Top Tags