Example of a variable formula: Link parametric variables to user-defined attributes

Tekla Structures
Muokattu: 3 Mar 2025
2026
Tekla Structures

Example of a variable formula: Link parametric variables to user-defined attributes

This example shows how to link parametric variables to the user-defined attributes of panels in a custom component. You can then use the user-defined attributes in view filters to show or hide the panels in the model.

  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 variable as follows:
    1. From the Value type list, select Text.
    2. In the Formula box, enter Type1.
    3. In the Label in dialog box box, enter Panel1.
  5. In the Custom component browser, browse for the user-defined attributes of the first panel.

    You will link the P1 variable to the USER_FIELD_1 property. However, the property is not visible in the Custom component browser.

  6. Make the USER_FIELD_1 property visible in the Custom component browser:
    1. Double-click the first panel in custom component view.

      The panel properties open in the property pane.

    2. Under More, click the User-defined attributes buttton to open the dialog for user-defined attributes.
    3. Go to the Parameters tab.
    4. Enter text in the User field 1 box.
    5. Click Modify.
  7. In the Custom component browser, click Refresh.

    USER_FIELD_1 appears under User-defined attributes in the Custom component browser.

  8. Link P1 to USER_FIELD_1.
    1. Right-click USER_FIELD_1 and select Add equation.
    2. Enter P1 after the equal sign, and then press Enter.

  9. Create two new parametric variables and link them to the user-defined attributes of the other two panels.
  10. Save the custom component.
  11. Close the custom component editor.

    You can now create a view filter in the model to hide or show panels using the User field 1 property and the Formula values you entered for the parametric variables in the filter.

Oliko tästä apua?
Lähetä
Edellinen
Seuraava