Example: Add a list with images in a custom component dialog box

Tekla Structures
2021
Tekla Structures

Example: Add a list with images in a custom component dialog box

This example shows how to add an illustrative list in the custom stiffener detail dialog box. You can do this either in the custom component dialog editor or by editing the input (.inp) file manually.

In the beginning of this example the dialog box has the text box shown below, and the you need to know the values (0 is left, 1 is right, and 2 is both plates) that control the creation of stiffener plates.

Replace the text box with a list that is easier to use:

Add a list by using the dialog editor

  1. Create a custom stiffener detail with all the needed variables that control which stiffener plates are created.

    In this example, the variable is called Plates created.

  2. Open the stiffener dialog box for editing.
    1. In the model, select the custom stiffener detail.
    2. Right-click and select Edit Custom Component Dialog Box.
  3. Check the name of the parametric variable that controls the plate creation.
    1. In the dialog editor, double-click the Plates created box.

      The Object Properties dialog box opens.

    2. Check the name of the parametric variable.

      In this example, the name is P4.

    3. Click Cancel to close the dialog box.
  4. Select the Plates created text box and click Delete.
  5. Click Insert > Attribute to add a new attribute list.
  6. Drag the attribute list to a suitable location, next to the Plates created label.
  7. Select the attribute list and then click Modify > Properties to edit its properties.
  8. Enter P4 as the Name of the attribute.

    Now the attribute list is linked to the parametric variable that controls the plate creation.

  9. Click Edit Values to add the list items.
  10. In the Edit Attribute Values dialog box, add an image for the left plate.
    1. Click Browse Add.
    2. Browse for a suitable image.

      If you create new images, make sure they are in the bitmap (.bmp) format. Save the images in the ..\ProgramData\Trimble\Tekla Structures\<version>\Bitmaps folder.

      The maximum image size is 245x245 pixels.

    3. Click Open.
  11. Repeat step 9 to add an image for the right plate, and then for both plates.
  12. In the Edit Attribute Values dialog box, select the image of both plates and then click Default to make the attribute the default value.

  13. Click OK.
  14. Click Apply in the Object Properties dialog box, and then click Cancel to close the dialog box.
  15. In the dialog editor, click File > Save to save the changes.
  16. Close and reopen the model for the change to take effect.

Add a list by editing the .inp file

  1. Create a custom stiffener detail with all the needed variables that control which stiffener plates are created.

    In this example, the variable is called Plates created.

  2. In the model, click File > Open the model folder to open the current model folder.
  3. Go to the \CustomComponentDialogFiles folder.
  4. Open the .inp file in a text editor.

  5. Remove the following line:

    parameter("Plates created", "P4", integer, number, 2)

  6. Add a new Plates created attribute with the following settings:

  7. Add a new P4 attribute with the following settings:

    The list now contains three options, and Both is the default value. The list options are linked to the variable P4 that controls the creation of the stiffener plates.

  8. Edit the line numbers so that there are no empty rows between the variables in the dialog box.

  9. Browse for the images you want to use in the dialog box.

    If you create new images, make sure they are in the bitmap (.bmp) format. Save the images in the ..\ProgramData\Trimble\Tekla Structures\<version>\Bitmaps folder.

    The maximum image size is 245x245 pixels.

  10. Replace the option texts with the actual file names of the images, but with the file name extension .xbm.

  11. Save the .inp file.
  12. Close and reopen the model for the change to take effect.
Was this helpful?
Previous
Next