Example of a variable formula: Modify a sub-component by using a component attribute file in a nested component

Tekla Structures
Upraveno: 3 Lis 2025
2026
Tekla Structures

Example of a variable formula: Modify a sub-component by using a component attribute file in a nested component

This example shows how to create a parametric variable that modifies a sub-component in a nested custom component on the basis of a component attribute file.

In this example you will use the value types Component name and Component attribute file, which work together. Use Component name for replacing a sub-component inside a custom component with another sub-component, and Component attribute file for selecting a different property file for the sub-component.

Component name and Component attribute file follow a fixed naming format: Px_name and Px_attrfile. Do not change the fixed name.

To show values for these in the custom component's dialog, x must be the same for both, for example, P2_name and P2_attrfile.

  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 two new parametric variables, click Add twice.
  4. Modify the first parametric variable as follows:
    1. From the Value type list, select Component name.

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

    2. In the Label in dialog box box, enter New component.
  5. Modify the second parametric variable as follows:
    1. From the Value type list, select Component attribute file.

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

    2. In the Name box, change the prefix of the second variable so that the prefixes for the two variables are the same.

      In this example, the prefix is P1.

      Note:

      The component name and component attribute file variables must always have the same prefix, otherwise they do not work.

    3. In the Label in dialog box box, enter Property file.
  6. Link the parametric variables to the Name and Attribute file properties of the nested component:
    1. In the Custom component browser, browse for the Name and Attribute file properties of the bolt group.
    2. Right-click Name and select Add equation.
    3. Enter P1_name after the equal sign, and then press Enter.
    4. Right-click Attribute file and select Add equation.
    5. Enter P1_attrfile after the equals sign, and then press Enter.
  7. Save the custom component.
  8. Close the custom component editor.
  9. In the model, select the custom component, and open the custom component dialog.
  10. To change the sub-component, click the button next to the name box.
  11. In the Applications & components catalog, select a suitable sub-component.
  12. To change the property file, click the button next to the name box.
  13. In the Attribute file list dialog, select a different attribute file.

    You can now change the sub-component and its property file directly from the custom component's dialog.

  14. In the custom component dialog, click Modify.

    Tekla Structures changes the sub-component and its attribute file in the nested custom component.

Bylo to užitečné?
Odeslat
Předchozí
Další