Pasar al contenido principal

Example of a variable formula: Replace a sub-component in a nested component

Modified: 3 Nov 2025 Tekla Structures 2026
2026
Tekla Structures

This example shows how to create a parametric variable that replaces a sub-component with another one in a nested custom component.

As a prerequisite, you need to have a nested custom component that includes a sub-component (in this case My connection). Replace the sub-component with another sub-component (My connection 2).

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

    The Variables dialog opens.

  3. To create a new parametric variable, click Add.
  4. Modify the parametric variable as follows:
    1. From the Value type list, select Component name.

      Tekla Structures automatically adds the suffix _name to the variable name. Do not delete the suffix.

    2. In the Formula box, enter the name of sub-component you want to replace, in this case My connection.
    3. In the Label in dialog box box, enter a suitable name for the label which will be visible in the custom component dialog, for example, New connection.

  5. Link the parametric variable to the Name property of the sub-component:
    1. In the Custom component browser, browse for the Name property of the sub-component.
    2. Right-click Name and select Add equation.
    3. Enter P1_name after the equal sign, and press Enter.

  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 sub-component is visible in the custom component's dialog.

  9. To change the sub-component, click the … button next to the name box.
  10. In the Applications & components catalog, select the My connection 2 sub-component. It will replace the My connection in the custom component.
  11. In the custom component dialog, click Modify.

    Tekla Structures changes the sub-component in the nested custom component.

Enviar

Table of Contents