Customize the dialog boxes of custom components by using a text editor

Tekla Structures
2021
Tekla Structures

Customize the dialog boxes of custom components by using a text editor

Each custom component has an input (.inp) file that defines the contents of the custom component's dialog box. If you are an advanced user, you can customize the dialog box input files manually in a text editor. Be careful when modifying an input file, as errors may cause the dialog box 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 dialog box.

Add new tabs

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

  3. Save the .inp file.
Note:

The fourth tab is reserved for the 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

  4. Save the .inp file.

Change the order of boxes

  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 check boxes in the custom component dialog box

This example shows how to add a check box 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 check boxes.

  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 check box 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 the 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 check boxes in the custom component dialog box.

    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 check box 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 check box 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 check boxes in the dialog box, the number of bolts changes accordingly in the model. For example:

    Note:

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

Was this helpful?
Previous
Next