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

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

How to make relation that sets a parameter according to dimensions?

thlavinka
7-Bedrock

How to make relation that sets a parameter according to dimensions?

Hello,

Could somebody help me to set the parameter "ROZMER by relation using part dimensions?

I often use a frame that consists from square profiles and created a template where i just change dimensions as on pic below. The parameter ROZMER appears in BOM and this i would like to be changed automatically.

ROZMER should look like "(real dimension d39:3) x (real dimension d40:3) x DELKA_RAMU" in this case "100x10x2000. (parameter "DELKA_RAMU" is an overal lenght, HLOUBKA_RAMU is overal width.

1.jpg

Thanks in advance.


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.
ACCEPTED SOLUTION

Accepted Solutions
TomU
23-Emerald IV
(To:thlavinka)

You say you want to combine "real dimensions", but your dimensions are currently driven by integers. It's super simple to combine multiple integer values into a text string. You just use the "integer to string" function:

ROZMER = ITOS(JEKL_PRUREZ_DELKA) + "x" + ITOS(JEKL_PRUREZ_TLOUSTKA) + "x" + ITOS(DELKA_RAMU/2)

On the other hand, if you want to combine real numbers you will need to first convert each real number to text and then combine the text values. You will have to decide right up front how many decimal places you want to keep. There are other discussions already on the community showing how, so I won't recreate something here.

convert real number into srting with decimals in relation

Finally, no conversion is required if you simply combine the dimensions in a note or table cell. These are built to automatically allow mixed variables. "D39:3 x D40:3" can be entered directly into a note (without the quotes).

View solution in original post

2 REPLIES 2
TomU
23-Emerald IV
(To:thlavinka)

You say you want to combine "real dimensions", but your dimensions are currently driven by integers. It's super simple to combine multiple integer values into a text string. You just use the "integer to string" function:

ROZMER = ITOS(JEKL_PRUREZ_DELKA) + "x" + ITOS(JEKL_PRUREZ_TLOUSTKA) + "x" + ITOS(DELKA_RAMU/2)

On the other hand, if you want to combine real numbers you will need to first convert each real number to text and then combine the text values. You will have to decide right up front how many decimal places you want to keep. There are other discussions already on the community showing how, so I won't recreate something here.

convert real number into srting with decimals in relation

Finally, no conversion is required if you simply combine the dimensions in a note or table cell. These are built to automatically allow mixed variables. "D39:3 x D40:3" can be entered directly into a note (without the quotes).

thlavinka
7-Bedrock
(To:TomU)

Thanks for your help.

Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags