Drawing code examples
Updated:
6 Aug 2020
Here you will find plenty of Tekla Structures drawing code examples to get you started with Tekla Open API.
These Tekla Open API drawing code examples shows in detail how to create drawing applications and plugins. Download Tekla Open API drawing code examples and look through the code to see what they do. You can make your own modifications and adapt the example to your own needs.
Before you start, see instructions how to get code examples.
Drawing applications
Code example: Drawing list handler | Go through various drawings and drawing objects. | |
Code example: Create views in drawings | Create general arrangement drawings with different views. | |
Code example: Create different dimensions | Create different dimensions for drawings. | |
Code example: Create straight dimensions to beams | Create straight x- dimensions to all the beams in the active drawing. | |
Code example: Get info of part | Select a part from a drawing and retrieve info about the part from the model. |
|
Code example: Create bounding box | Create a bounding box around the model object that the user selects in the drawing. | |
Code example: Dimension Arrowhead | Create dimension and use the Arrowhead attribute. Specifically, the example demonstrated how use customized arrows from dimension_arrows.sym file. | |
Code example: Level mark | Create level marks and modify the level mark properties. | |
Code example: Print drawing | Set the printing attributes, such as number of copies, orientation, paper size and scaling, and print a drawing. |
Drawing plug-ins
Code example: Create drawing plug-in using Windows Forms | Create a basic drawing plug-in that uses Windows Forms. | |
Code example: Create an ellipse | Create an ellipse to the drawing based on users input. | |
Code example: Insert mark with text to part | Insert a mark with defined text on a picked part in drawing. | |
Code example: Insert mark with point info | Pick two points and insert a mark to the drawing based on the points. | |
Code example: Draw symbol to indicate location of bolt | Pick a bolt in the drawing and draw an arrow in the direction of the slotted bolt. |