Customize the custom component dialogs by using a text editor

Tekla Structures
Изменено: 30 окт 2025
2026
Tekla Structures

Customize the custom component dialogs by using a text editor

Each custom component has an input (.inp) file that defines the contents of the custom component's dialog. The dialog input files can be manually customized in a text editor. Be careful when modifying an input file, as errors may cause the dialog to disappear.

Note that the General tab is reserved for predefined general properties. You cannot rename the General tab or add more parameters to it.

Alternatively, you can use the Custom component dialog editor tool to customize the dialogs. For more information, see Customize the custom component dialogs.

Add new tabs

  1. Open the .inp file in a text editor.
  2. Add a new tab definition, as shown below:

    The tab definitions are of format tab_page("", " tab_name ", tab_number).

  3. Save the .inp file.
Note:

The fourth tab (General) is reserved for the predefined general properties, so you cannot add your own parameters to it.

Add text boxes

  1. Open the .inp file in a text editor.
  2. Add parameter elements and enclose them in curly brackets, as shown below:

  3. Save the .inp file.

Add images

  1. Create an image and save it in bitmap (.bmp) format in the ..\ProgramData\Trimble\Tekla Structures\<version>\Bitmaps folder.
  2. Open the .inp file in a text editor.
  3. Add an image definition, as shown below:

    (1) y = 100

    (2) x = 50

    (3) height = 75

    (4) width = 100

    The image definitions are of format picture("image_name", width, height, x_coordinate, y_coordinate).

  4. Save the .inp file.

Change the order of boxes

By default, variables appear in a custom component dialog in the same order as they were created.

  1. Open the .inp file in a text editor.
  2. Change the last number in the parameter definition.

    The boxes are listed from top to bottom, as shown below:

  3. Save the .inp file.

Change the location of boxes

You can define an exact location for each text box.

  1. Open the .inp file in a text editor.
  2. Define the exact location of the box using three values: the x coordinate, y coordinate, and width of the box.

    For example:

    (1) x = 374

    (2) y = 25

    (3) width = 160

  3. Save the .inp file.

Example: Add a group of checkboxes in the custom component dialog

This example shows how to add a checkbox for each bolt group in a custom component by modifying the .inp file. When the component is used in a model, you can select which bolts to create by selecting the desired checkboxes.

  1. Define a custom component that contains bolts.

    For example, create a custom tee connection that creates one bolt group and three single bolts:

  2. Create parametric variables that control the creation of bolts.

    With checkbox groups, the Value type of these variables must be Yes/No. For example, create three variables P1, P2, and P3, one for each single bolt in the custom tee connection.

  3. Link the variables to the Creation property of the bolts.

    For example, link the variable P1 to the Creation property of the first bolt, the variable P2 to the Creation property of the second bolt, and so on.

  4. Save the custom component.
  5. In the model, click File > Open model folder to open the current model folder.
  6. Go to the \CustomComponentDialogFiles folder.
  7. Open the .inp file in a text editor.
  8. Add an image definition.

    For example:

    If you use a custom image, save it in bitmap (.bmp) format in the ..\TeklaStructures\<version>\Bitmaps folder.

  9. Add a toggle_group element to define the toggle group origin, that is, the position of the group of checkboxes in the custom component dialog.

    Use the x and y coordinate values to define the position. For example:

    (1) x = 200

    (2) y = 320

  10. Within the toggle_group element, add a line for each checkbox you want to add.

    Use the same parametric variables that you created in step 2.

    The two numeric values after the variable name are offsets from the toggle group origin. For example, the first definition "P1", 160, -165, "0" means that the checkbox for the variable P1 is located 160 steps right and 165 steps up from the toggle group origin.

    Direction

    Negative values

    Positive values

    X

    left

    right

    Y

    up

    down

    (1) offset in X direction

    (2) offset in Y direction

  11. Save the .inp file.
  12. Close and reopen the model for the change to take effect.

    Now when you select and clear checkboxes in the dialog, the number of bolts changes accordingly in the model. For example:

    Note:

    Tekla Structures automatically adds the Effect in modify label and checkbox for each toggle group you create.

Была ли эта информация полезной?
Отправить
Назад
Далее