API Reference

Detailed and full API reference helps you master Tekla development

This is the most recent version of Tekla Open API.
For older versions, please visit Tekla Warehouse.

PlacingBase Class

The PlacingBase class is the base class for placing types. If you set a user defined Placing to an object it will override the PreferredPlacingType set in the object's attributes. Please note that not all objects accept all types. If you try to use the wrong type it will not be accepted (Insert, Modify will fail). (It is strongly recommended to use the PreferredPlacingTypes to assign new Placings to objects.)
Inheritance Hierarchy

Namespace:  Tekla.Structures.Drawing
Assembly:  Tekla.Structures.Drawing (in Tekla.Structures.Drawing.dll) Version: 2023.0.1
public abstract class PlacingBase : IIsEqual

The PlacingBase type exposes the following members.

Public methodIsEqual
Compares the current object with an object of the same type.
using Tekla.Structures.Drawing;
using Point = Tekla.Structures.Geometry3d.Point;

public class Example
    public void Example1()
        DrawingHandler DrawHandler = new DrawingHandler();
        Drawing CurrentDrawing = DrawHandler.GetActiveDrawing();
        ContainerView Sheet = CurrentDrawing.GetSheet();
        DrawingObjectEnumerator AllViews = Sheet.GetViews();
            if(AllViews.Current is View)
                View CurrentView = (View)AllViews.Current;

                Point MyInsertionPoint = new Point(200, 400);
                Text.TextAttributes MyTextAttributes = new Text.TextAttributes();

                // Here we create one Text with a specific placing given to it.
                // Please note that should the object be arranged (using the command Arrange Drawing Objects (Freeplace)),
                // then it will use the PreferredPlacingType specified in the attributes (which in this case is the same).
                MyTextAttributes.PreferredPlacing = PreferredTextPlacingTypes.LeaderLinePlacingType();
                Text MyText = new Text(CurrentView, MyInsertionPoint, "Text with a LeaderLine.",
                                       new LeaderLinePlacing(new Point(100, 100)), MyTextAttributes);

                // Here we create a text that is placed along a line with an arrow indicating the starting point of the line.
                MyInsertionPoint = new Point(200, 600);
                MyText = new Text(CurrentView, MyInsertionPoint, "Text with a LeaderLine.",
                                  new LeaderLinePlacing(new Point(100, 100)));
                MyText.Attributes.PreferredPlacing = PreferredTextPlacingTypes.PointPlacingType();
                MyText.TextString = "Text will now be without a LeaderLine.";
                AllViews = ((ContainerView)AllViews.Current).GetViews();
See Also
Was this helpful?
The feedback you give here is not visible to other users. We use your comments to improve the content.