Skip to main content

Use parametric variables to set object properties

Modified: 31 Oct 2025 Tekla Structures 2026
2026
Tekla Structures

Use parametric variables to set basic properties (such as name, material, profile, position number, and so on) for any object the custom component creates. Parametric variables automatically get the prefix P (parameter), which is shown in the Variables dialog.

Example: Create a parametric variable for weld size

The following example shows how to create a parametric variable that sets all welds in a custom component to a given size. After creating the variable, you are able to change the weld size directly in the custom component's dialog.

  1. Select the custom component in the model, right-click and select Edit custom component.
  2. On the Custom component editor toolbar, click the Display variables button.

    The Variables dialog opens.

  3. Create a new parametric variable.
    1. Click Add.
    2. In the Value type list, change the variable's value type to Length.

      The type determines what kind of values can be used with this variable. In this example, select Length, which is suitable for lengths and distances.

    3. In the Name box, enter Weldsize as the name of the variable.

      You can also use the default name, such as P1. In this example, enter Weldsize as the name of the variable.

    4. Leave the Formula box empty.
    5. In the Visibility list, define whether the variable will be visible in the custom component's dialog.

      Hide the variable if you only use it in calculations. Show the variable if you want to be able to edit the value in the custom component's dialog. In this example, select Show.

    6. In the Label in dialog box box, enter a descriptive name for the parametric variable, for example, Weld size.
  4. Click Close.

    You have now created a parametric variable with the following settings:

  5. Link the parametric variable to the Size above line property.
    1. In the Custom component browser, browse for the Size above line property of the weld.
    2. Right-click Size above line and select Add equation.

    3. Enter Weldsize after the equal sign, and then press Enter.

    4. Repeat the procedure for the other welds as well, so that they will all be linked to the same property.
  6. Save the custom component.
  7. Close the custom component editor.
  8. Select the custom component in the model, and open the custom component dialog.

    The option to change the weld size is visible in the custom component's dialog.

    If you change the weld size value now, the size of all welds within the custom component will change accordingly.

For more examples of the use of parametric variables, see Examples of parametric variables and variable formulas in custom components.

Submit

Table of Contents