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

Tekla Structures
2021
Tekla Structures

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

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

  1. On the Custom component editor toolbar, click the Display variables button.

    The Variables dialog box opens.

  2. Click Add to create a new parametric variable.
  3. Modify the variable as follows:
    1. In the Value type list, select Text.
    2. In the Formula box, enter Type1.
    3. In the Label in dialog box box, enter Panel1.
  4. 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 attribute. However, the attribute is not visible in the Custom component browser.

  5. Make the user-defined attribute visible in the Custom component browser:
    1. Double-click the first panel.

      The panel properties open in the property pane.

    2. Click More.

      The dialog box for user-defined attributes opens.

    3. Go to the Parameters tab.
    4. Enter text in the User field 1 box.
    5. Click Modify.
  6. In the Custom component browser, click Refresh.

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

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

  8. Create two new parametric variables and link them to the user-defined attributes of the other two panels.
  9. Save the custom component.
  10. 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 attribute and the Formula values you entered for the parametric variables in the filter.

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