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

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

Creating a description relation driven from dimension parameters.

jason.webb
1-Newbie

Creating a description relation driven from dimension parameters.

Help anyone,


I am trying to create a relation to drive the title's of instances. I have the following and this is not working. Any help would be apprecitated.


1st attempt


/* This if statement relation determines which title to apply to the part, a rectangular tube description or a square tube description.

HEIGHT = D2
WIDTH = D3
WALL_THICKNESS = D5
OAL = D6

If HEIGHT == WIDTH
TITLE = TB SQ height X wall_thickness X oal
else
TITLE = "RECT TB D2 x D3 x D5 x D6"
endif



2nd attempt



/* This if statement relation determines which title to apply to the part, a rectangular tube description or a square tube description.

If HEIGHT == WIDTH
TITLE = "TB SQ" + height + "X" + wall_thickness + "X" + oal
else
TITLE = "RECT TB" + itos(height) + "X" + itos(width) + "X" + itos(wall_thickness) + "X" + itos(oal)
endif


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
2 REPLIES 2

Here is what we use. This is if the parameter is an integer where MOD_HIGH/MOD_WIDE is and integer.

PTC_COMMON_NAME = PART_NAME

PART_NAME = "MOD MTG SHEET, " + ITOS(\
MOD_HIGH) + " x "+ ITOS(MOD_WIDE) + " , DB4K-G1"

If the parameter is a real number the ITOS (Integer to String) function doesn't work
One way around that would be to replace:
ITOS(HEIGHT)
With
ITOS(FLOOR(HEIGHT)) + "." + ITOS( (HEIGHT - FLOOR(HEIGHT)) * 100)

[cid:image001.jpg@01CD8C4C.079DD600]


Andy Hermanson
Engineering Design Applications

tel 605.275.1040 x51114 mobile 605.310.8168
website www.daktronics.com

I forgot to mention my title is currently set to a string. I have tried to floor the height, width and mat_thickness parameter and for the material thickness it resorts to nothing. Which makes sense as most of my instances are less than 1/2" thick. I have also tried the ins with the same results.



Jason

Top Tags