Exercise 1: Create pad footings

Updated: 27 Mar 2024

You will learn how to create pad footings in Tekla Structures through the API. 

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

Before you start:

  1. In Tekla Structures, create new model using default environment or open this model: Exercise-model.zip

    • Extract the .zip file to \C:\TeklaStructuresModels\ for easy access.

  2. Start Microsoft Visual Studio.

Create pad footings

Create pad footings on each grid intersections on grid lines A, E, 1 and 6. So create 18 pad footings in total. Follow these steps to create your application:

  1. Create a new Model object that represents the Tekla Structures model you have opened in Tekla Structures.

  2. Add a button "Create Pad Footings" to the application form and pad footing creation to the Click-event. The Click-event should include the following:

    • Check if you have a Tekla Structures model open that you can connect to.

    • Create two for loops to cycle through the X and Y directions of the positions and create pad footings with the method mentioned in step 3.

    • Commit changes to Tekla Structures using CommitChanges().

  3. Create a method that creates and inserts one pad footing based on the two input positions using the Beam class. Set up the following properties to your pad footings:

    Name = "FOOTING"
    Profile.ProfileString = "1500*1500"
    Material.MaterialString = "C50/60" 
    Class = "8"
    StartPoint
    EndPoint (change Z coordinate 500.0 mm lower than StartPoint)
    Position.Rotation = Position.RotationEnum.FRONT
    Position.Plane = Position.PlaneEnum.MIDDLE
    Position.Depth = Position.DepthEnum.MIDDLE

 Note, that these values might need to be localized and profile and material needs to be found in environment.

  1. Test your application:

    • On the Debug menu, click Start Debugging to run the project and show your form with the Create Pad Footings button.

    • Click Create Pad Footings.

 

The result should look similar to this:

Tekla structures Open API model create pad footings

Tip:
In case you are new developer take a look at this C# Guide by Microsoft for more information about the C# language.

Run example code

  1. Open Microsoft Visual Studio.

  2. On the File menu, point to Open and click on Project/Solution.

  3. Open the \Exercise1-PadFootings\ folder and click Exercise1.csproj, to open the project.

  4. On the Debug menu, click Start debugging, to run the project and show your form with the Create Pad Footings button.

  5. Click Create Pad Footings, to place pad footings at the grid intersections of the model in Tekla Structures.

Was this helpful?
The feedback you give here is not visible to other users. We use your comments to improve the content.