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

1-Newbie

## 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.

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

Accepted Solutions
23-Emerald III
(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).

2 REPLIES 2
23-Emerald III
(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).

1-Newbie
(To:TomU)