Model code examples

Updated: 7 Feb 2024

Here you will find a bunch of Tekla Structures model code examples to get you started with Tekla Open API. These code examples shows in detail how to create external applications, plug-ins, and macros.

 

You can download Tekla Open API model code examples and look through the code to see what it does. You can make your own modifications and adapt the example to your own needs.

Before you start, see instructions how to get code examples.

Tekla Open API model code examples - model of Health care center JUST

Model applications

Code example: Create beam using two points    Create a beam to Tekla Structures model.
Code example: Create beam using user input   Create a beam to Tekla Structures model based on users input.
Code example: WPF beam application   Simple WPF code example.
Code example: Create single rebars and stirrups   Create single rebars and stirrups to Tekla Structures model.
Code example: Create single rebars and stirrups using system connections   Create single rebars and stirrups to Tekla Structures model using system connections.
Code example: Split polygon weld into segments  

Split an existing polygon weld into its segments.

Code example: Manage work planes

  Manage the work plane in Tekla Structures model.
Code example: Modify bent plates   Creates a simple bent plate and shows different ways to modify it.
Code example: Create bent plates   Create simple bent plates using different creation methods.
Code example: Create box using bent plates   Create a simple box using different bent plate creation methods.
Code example: Create cubes and pyramids   Create cubes and pyramids using the Brep class.
Code example: Clash check   Run clash check and use related events from Tekla Open API.
Code example: Export model objects to NC files   Export model objects to NC files via scripting and API calls.
Code example: Get CNC solid   Return the solid face on secondary part that is contacting or close to contacting primary part.
Code example: Export solid info   Export solid info of selected parts to an XML file.
Code example: Create, modify and enumerate objects   Create and modify all kinds of objects. Also different enumeration methods.
Code example: Center line intersection of part   Draw the faces of a part that intersect with the center line of the part.
Code example: Create and modify rebars   Create a rebar set and modify it by adding new legs, guidelines, end details and more.
Code example: Create shapes using catalog   Let the user select the shape of an item and insert it to the model.
Code example: Tekla events   Activate and deactivate events.

 

Model plug-ins

Code example: WPF plugin   A simple code example demonstrates how to create a Tekla Structures plugins using WPF dialog.
Code example: Create model plug-in using Windows Forms    Create a basic model plug-in that uses Windows Forms.
Code example: Localization and translation   Create a separate localization instance.
Code example: Create single rebars and stirrups using system connections   Create single bars and stirrups to Tekla Structures model using system connections.
Code example: Create beams with splice connections   Create beams and splice connections between them to Tekla Structures model.
Code example: Create user defined custom beam   Create a custom beam defined by user input.
Code example: Create user defined beam   Create a beam defined by user input.
Code example: Create columns   Create a column to Tekla Structures model.
Code example: Create beam using ImageListComboBoxControl   Use ImageListComboBox control in plug-ins and create a beam.
Code example: Create user defined reinforced beam    Select properties both for the beam and the reinforcement and create the reinforced beam between two picked points.
Code example: Create splice connections between beams   Pick some properties for the connection and create it between two beams.
     

Model macros

Code example: Create single rebars and stirrups    Create single rebars and stirrups to Tekla Structures model.
Code example: Create single rebars and stirrups using system connections   Create single bars and stirrups to Tekla Structures model using system connections.
     
Was this helpful?
The feedback you give here is not visible to other users. We use your comments to improve the content.