LeaderLinePlacing Class |
The LeaderLinePlacing class defines a placing where the
object is placed attached to a leader line.
Namespace: Tekla.Structures.Drawing
Assembly: Tekla.Structures.Drawing (in Tekla.Structures.Drawing.dll) Version: 2025.0.0-alpha00045580+dc02c3918546f1e94eb2d3b13ea99057fb3313e0
The LeaderLinePlacing type exposes the following members.
| Name | Description | |
|---|---|---|
| LeaderLinePlacing |
Creates a new leader line placing instance.
The given point defines the start point of the leader line.
|
| Name | Description | |
|---|---|---|
| StartPoint |
The start point of the leader line
(if multiple leader lines exist, only returns the first).
|
| Name | Description | |
|---|---|---|
| IsEqual |
Compares the current object with an object of the same type.
(Overrides PlacingBaseIsEqual(Object).) |
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(); while(AllViews.MoveNext()) { 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); MyText.Insert(); // 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.Insert(); } else { AllViews = ((ContainerView)AllViews.Current).GetViews(); } } } }