Define and update user-defined attributes (UDAs)

Tekla Structures
2023
Tekla Structures

Define and update user-defined attributes (UDAs)

User-defined attributes (UDAs) are attributes that you can set for an object in a model or a drawing. You can use UDAs for many purposes, such as in filters, drawings, reports, export, import, fabrication, erection, and revision handling.

The property pane and many dialog boxes contain UDAs for various objects, including beams, columns, bolts and drawings. Tekla Structures shows these fields when you click the More button in the property pane or the User-defined attributes button in a dialog box.

When you define new user-defined attributes

You can create your own user-defined attributes that you need in your company, or for a specific project.

The user-defined attributes can be numbers, text, lists, or dates. They can be set to be unique for an object or allowed to be copied. They can also be ignored by numbering or can affect numbering.

  • The user-defined attributes are managed in the objects.inp file.

    To define new user-defined attributes, create your own objects.inp file in the model, project or firm folder.

  • When you define a new user-defined attribute, the maximum length for a user-defined attribute name is 19 characters. Tekla Structures only looks for the first 19 characters. For example, Tekla Structures does not consider TEST_ATTRIBUTE_OBJECT and TEST_ATTRIBUTE_OBJECX to be different.

    The attribute name is case-sensitive. Do not use spaces or reserved characters in attribute names.

  • Make the definition of the user-defined attribute unique. A user-defined attribute cannot have different definitions for different object types, such as beams and columns.

  • After adding your own user-defined attributes, run the Diagnose and change attribute definitions command to update the definitions in the model.

  • The object.inp files are merged so that if there are user-defined attributes in any of the files, they are shown in the user interface. Tekla Structures merges the files in a way that eliminates duplicate attributes. If Tekla Structures encounters the same attribute name in different objects.inp files, the attribute from the first read objects.inp file is used.

  • If you need to have several objects.inp files in the same folder, you can use a suffix in the file name to use all the files. This way you can have several objects_<suffix>.inp files in the same folder. The file name could be objects_precast.inp, for example.

  • To check which object types can be modified in the objects.inp file, see List of all available object types for objects.inp.

Warning:

Do not copy the objects.inp file in the ..\environments\common\inp\ folder. Copying the file creates unnecessary duplicates and later objects.inp updates by Tekla Structures can be lost.

Search order of objects.inp files

User-defined attributes are defined in objects.inp files. These files are located in different folders following the Tekla Structures folder setup, and they are merged together during startup.

The objects.inp file reads the user-defined attributes in order from the folders listed below, starting from the model folder:

Folder defined by advanced option Advanced option
Model Current model folder
Project XS_PROJECT (your defined project folder)
Firm XS_FIRM (your defined firm folder)
System XS_SYSTEM (your defined system folder)
inp XS_INP (your defined inp folder)

The files are merged so that if there are user-defined attributes in any of the files, they are shown in the user interface. Tekla Structures merges the files so that duplicate attributes are removed. If Tekla Structures encounters the same attribute name in different objects.inp files, the attribute from the first read objects.inp file is used.

If you need to have several objects.inp files in the same folder, you can use a suffix in the file name to use all the files. This enables having several objects_<suffix>.inp files in the same folder. The file name could be objects_precast.inp, for example.

If you need to change existing user-defined attribute definitions

If you need to change the existing user-defined attributes, such as changing the value_type, create a new user-defined attribute instead of modifying the current one in the objects.inp file. For example, if you change the value_type from string to option, the value cannot be changed for parts that have the property specified with the old value type, and the value is shown incorrectly in reports or when you inquire objects.

When the advanced option XS_DIAGNOZE_AND_REPAIR_WRONG_UDA_TYPE is set to TRUE, you can use Diagnose & repair > Diagnose and change attribute definitions to detect and repair the incorrect UDA value types by reverting the value types to the default values. The command checks that the UDA value types, such as string or option, defined in the objects.inp file match their values defined in environment.db. A mismatch can happen if you change the value types after the UDA values have been assigned.

Update definitions of user-defined attributes (UDAs) in a model

When you have changed definitions of a user-defined attribute by modifying the objects.inp file, update the definitions in the model.

  1. Open the model.
  2. On the File menu, click Diagnose & repair.
  3. In the Utilities section, click Diagnose and change attribute definitions.

    The Diagnose & Change Attribute Definitions dialog box opens.

  4. Select an attribute from the list on left side to see the comparison of current definitions and objects.inp definitions.
  5. In the Object classes with Objects.inp differences compared to current settings list, select the definitions that you want to update.
  6. Click Change current settings to selected Objects.inp settings.

Environment database file

To ensure consistent model behavior when a model is used with different roles, the environment database file (environment.db) contains the definitions of the user-defined attributes (UDAs) used in the model.

When you create a new model, Tekla Structures merges the definitions from your objects.inp files to the environment.db file. Later, when you add new user-defined attributes to the objects.inp file, the definitions are saved in environment.db when you open the model.

You can modify your user-defined attributes in an objects.inp file but the changed definitions are not automatically applied. If there are conflicts between definitions in an objects.inp file and definitions the environment.db file, the definitions in environment.db are used. To see the conflicts, run the Diagnose and change attribute definitions command, then select the attribute definitions that you want to update in the objects.inp file.

Note: Do not directly edit the environment.db file.
Was this helpful?
Previous
Next