User-defined template attributes

Tekla Structures
2023
Tekla Structures

User-defined template attributes

User-defined template attributes are defined in the contentattributes_userdefined.lst file. By default, this file includes most of the user-defined attributes that are visible in the part properties.

To use your own attributes in templates and reports, make a copy of the file, rename it appropriately, and add the necessary attributes to that file.

The contentattributes_userdefined.lst file is divided into two sections:

  • A list of attribute names and default settings:

  • A list of attributes assigned to content types:

    1. The content type of the row in Template Editor
    2. The attribute hierarchy in Template Editor
    3. Customizable comments, such as the tab name in the user-defined attributes dialog box
    4. The name of the user-defined attribute, must be the same as in the objects.inp file

Example: Add user-defined template attributes to the Template Editor

This example shows how to add your own user-defined attributes to the attribute tree in the Template Editor.

Before you start, add your user-defined attribute to the objects.inp file. For example, you might add an attribute named MY_ATTRIBUTE to the user-defined properties of drawings.

  1. Open the contentattributes_userdefined.lst file in a text editor.

    You can find this file in the \bin\applications\Tekla\Tools\TplEd\settings folder in the Tekla Structures installation folder.

  2. Save the file with an appropriate name, for example MY_contentattributes_userdefined.lst, in the same folder.
  3. Add MY_ATTRIBUTE to the list of attribute names and, define the settings as follows:

  4. Add MY_ATTRIBUTE to the list of attributes assigned to content types.

    Select the content type according to which object the attribute is associated in the objects.inp file. In this example, the content type is DRAWING. Add the attribute in the format USERDEFINED.<ATTRIBUTE_NAME>.

  5. Save the changes.
  6. Open the contentattributes.lst file in a text editor.
  7. Add the following line in the file:

    [INCLUDE MY_contentattributes_userdefined.lst]

  8. Save the changes.

    The attribute is shown in the attribute tree in Template Editor, under DRAWING > USERDEFINED:

Add comments to user-defined template attributes

You can add your own comments to the user-defined attributes in the Template Editor attribute tree.

  1. Open your copy of the contentattributes_userdefined.lst file.

    For example, MY_contentattributes_userdefined.lst. Do not modify the original contentattributes_userdefined.lst file.

  2. Scroll down to the list of attributes assigned to content types.
  3. Add your comment inside quotation marks, after the attribute name.

    For example:

  4. Save the changes.

    The comment you added is shown in the attribute tree in Template Editor:

Add hierarchy to user-defined template attributes

You can add your own hierarchy to the Template Editor attribute tree.

Warning:

User-defined attributes are case sensitive. Ensure that you enter the attribute name using the correct case for all characters.

  1. Open your copy of the contentattributes_userdefined.lst file.

    For example, MY_contentattributes_userdefined.lst. Do not modify the original contentattributes_userdefined.lst file.

  2. Scroll down to the list of attributes assigned to content types.
  3. Define the hierarchy in square brackets, between USERDEFINED. and the attribute name.

    For example:

    Note:

    Ensure that you include the periods after the brackets and between the hierarchies.

  4. Save the changes.

The new hierarchy is shown in the attribute tree:

Was this helpful?
Previous
Next