You are here

Example: Using user-defined attributes in custom components

Created: 2013-11-01 by Tekla BetC_documentation@tekla.com

Software version: 
19.0
Environment: 
Not environment-specific
Content rating: 
No votes yet

Example: Using user-defined attributes in custom components

In this example, you will link parametric variables to user-defined attributes of the panels. You can then use the user-defined attributes in view filters to show or hide the panels.

To use user-defined attributes in a custom component:


  1. Open the Variables dialog box in the custom component editor.
  2. Create a new parametric variable.
  3. Modify the parametric variable.
    • Change Value type to Text.

    • Enter Type1 in Formula.

    • Enter Panel1 in Label in dialog box.

  4. Open the Custom component browser in the custom component editor.
  5. Browse for User-defined attributes of the first panel.

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

  6. Make the user-defined attribute visible in the Custom component browser.
    1. Double-click first of the panels.

      The panel properties dialog box opens.

    2. Click User-defined attributes....

      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.
  7. Click Refresh in the Custom component browser.

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

  8. Link P1 to USER_FIELD_1.

  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 and hide or show panels using the User field 1 attribute and the Formula values you entered for the parametric variables in the filter.