Guides and Articles

Use this documentation when building your Tekla Structures apps

Exercise 6: Let user select rebars for pad footings

Updated: 31 Oct 2017

You will now learn how to use customized user interface controls to select profiles and meshes from the catalogs in Tekla Structures.

After downloading the TSOpenAPISelfLearningExercises package from GitHub (button above), find the example code for this exercise at \Exercise6-Select-Bars\ folder.

Before you start, Open the project that you created in exercise 5.

Let the user select rebars for pad footings


  1. Add the ReinforcementCatalog user interface control to your form to select the rebars for pad footings.

  2. Add three textboxes to show the size, grade and bending radius of the selected rebar.

    • Use the values of these textboxes to select values in the reinforcement catalog dialog when the dialog opens.

  3. Create callbacks for the events “SelectClicked” and “SelectionDone”.

  4. Modify the hardcoded values for the rebars in the code.

    • Rebar bending radius can have several values in the catalog, for example “20 40” so those values need to be handled by the application. So instead of defining the radius values in code as we did earlier Radiusvalues.Add(40.0) we can ask the values from the user:
      char[] Separator = {' '};
      string[] Radiuses = BendingRadiusTextBox.Text.Split(Separator, StringSplitOptions.RemoveEmptyEntries);
      foreach(string Item in Radiuses)
  5. Bound values of controls to attributes.
  6. Test your application.


Your application form should look something like this:

 Tekla structures open api Application form user select rebars for pad footings