Hello!

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

Example: Create and update a user-defined attribute (UDA)

Added August 31, 2016 by Tekla User Assistance tekla.documentation@trimble.com

Software version: 
2016i

Example: Create and update a user-defined attribute (UDA)

Example: Create and update a user-defined attribute (UDA)

This example shows how to create your own user-defined attributeobject 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.

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

) and update the model to use the changed attribute definition.

Create a new user-defined attribute

  1. Create a new model and save it.

    The user-defined attributes in the model are merged from objects.inp files and Tekla Structures saves the attribute definitions in the environment.db file in the model folderfolder that is used for storing files associated with a model

    Tekla Structures stores all files associated with a model in a folder it creates with the same name as the model database (.db1).

    In multi-user mode all users access the same model folder.

    .

  2. Close the model.

  3. Create an input fileInput files are used for different purposes, for example, for defining the content and structure of a dialog box and for defining certain reinforcement-related settings.

    Input files have the extension .inp, for example rebar_config.inp.

    called objects.inp in the model folder by using a standard text editor.

    1. Enter the following information in objects.inp.

      /***************************************************************************/

      /* Part attributes */

      /***************************************************************************/

      part(0,"Part")

      {

      /* User defined tab page */

      tab_page("My UDA tab")

      {

      /* User defined attribute */

      attribute("MY UDA", "My UDA", string,"%s", no, none, "0,0", "0,0")

      {

      value("", 0)

      }

      }

      tab_page("My UDA tab", "My UDA tab", 19)

      modify (1)

      }

      /***************************************************************************/

      /* Column attributes */

      /***************************************************************************/

      column(0,"j_column")

      {

      /* Reference to the user defined tab page that is defined above in */

      /* the part() section: */

      tab_page("My UDA tab", "My UDA tab", 19)

      modify (1)

      To see the example text file, click objects.inp - example 1.

      Note:

      If you want to create a user-defined attribute that also affects numberingprocess of assigning position numbers to parts, cast units, assemblies, or reinforcement

      In Tekla Structures, the position numbers assigned in the numbering are shown in marks and templates, for example.

      , set the special_flag property of the attribute to yes (it is no in the example above). Also, just like in the example above, the definition of the tab_page must be in the part section, and the column ( beam , etc.) section must have only a reference to it.

  4. Save objects.inp.

Test the user-defined attribute

  1. Open the model.

  2. Create a steel column.

  3. Double-click the steel column to open its properties dialog box.

  4. Click User-defined attributes.

  5. Go to My UDA tab.

  6. Enter a value in the My UDA box.

  7. Click Modify.

  8. Copy the steel column.

  9. Check the My UDA box of the new steel column.

    The attribute value was also copied.

  10. Close the model.

Modify the user-defined attribute to make it unique

  1. Open the objects.inp file in the model folder by using a standard text editor.

  2. Enter unique_ before the user-defined attribute.

    /***************************************************************************/

    /* User-defined attributes */

    /***************************************************************************/

    part(0,"Part")

    {

    /* Common tab pages for part attributes */

    tab_page("My UDA tab")

    {

    unique_ attribute("MY UDA", "My UDA", string,"%s", no, none, "0,0", "0,0")

    {

    value("", 0)

    }

    }

    tab_page("My UDA tab", "My UDA tab", 19)

    modify (1)

    }

    /***************************************************************************/

    /* Column attributes */

    /***************************************************************************/

    column(0,"j_column")

    {

    tab_page("My UDA tab", "My UDA tab", 19)

    modify (1)

    }

    This makes the user-defined attribute unique, meaning that the value of the user-defined attribute will not be copied to another part.

  3. Save objects.inp.

    To see the example text file, click objects.inp - example 2.

Test the unique user-defined attribute

  1. Open the model.

  2. Enter a value in the My UDA box for a steel column and click Modify.

  3. Copy the steel column.

  4. Check the My UDA box of the new column.

  5. The value was copied, so the user-defined attribute in the model is not unique. There is a conflict between the environment.db and objects.inp definitions.

Update the definitions of user-defined attributes

  1. On the File menu, click Diagnose & repair and in the Utilities area, click Diagnose and change attribute definitions.

    The Diagnose & Change Attribute Definitions dialog box opens.

  2. Select My UDA in the Attribute area on the left.

    You can see that My UDA is not unique in the current setting, but it is set to unique in objects.inp.

  3. Select the definition in the area on the right.

  4. Click Change current settings to selected Objects.inp settings.

    Now the definition of the user-defined attribute is updated in the model.

If you now copy a steel column that has a value for My UDA , the value is not copied to the new column.

Quick feedback

The feedback you give here is not visible to other users. We use your comments to improve our content.
We use this to prevent automated spam submissions.
Content rating: 
No votes yet