Did you know that logged in users can see a lot more content?

Example: Using user-defined attributes in custom components

Added November 1, 2013 by Tekla User Assistance tekla.documentation@trimble.com

Software version: 

Example: Using user-defined attributes in custom components

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 component that the user creates and uses for creating model objects whose composition the user can modify as a group


  1. Open the Variables dialog box in the custom component editor tool that is used for modifying component that is created by a custom component, and for creating dependencies between component objects and other model objects


  2. Create a new parametric variable variable used to define a value for a parametric property

    A parametric variable does not include a dependency.

    For example, name, material grade, and bolt size are parametric variables.


  3. Modify the parametric variable string that is used to bind model objects or to set or store values

    In Tekla Structures, variables have names like P4 or D2.


    • 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 object property created by the user in order to widen the range of predefined object properties

    User-defined attributes are used when the predefined object properties are not sufficient but more properties are needed. For example, comment, locked, and erection status are user-defined attributes.

    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 filter used for defining which objects are displayed in a model view or drawing view

View filter chooses objects according to object properties. The user can filter objects according to their profile or material, for example.

and hide or show panels using the User field 1 attribute and the Formula values you entered for the parametric variables in the filter.

Quick feedback

Your feedback on the documentation. The feedback you give here is not visible to other users. Please use the "contact us" form instead if you have a query and you wish to receive a reply.
We use this to prevent automated spam submissions.
Content rating: 
No votes yet