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
SystemObject
Tekla.Structures.DrawingPlacingBase
Tekla.Structures.DrawingAlongLinePlacing
Tekla.Structures.DrawingBaseLinePlacing
Tekla.Structures.DrawingLeaderLinePlacing
Tekla.Structures.DrawingPointPlacing
Tekla.Structures.DrawingPlacingBase
Tekla.Structures.DrawingAlongLinePlacing
Tekla.Structures.DrawingBaseLinePlacing
Tekla.Structures.DrawingLeaderLinePlacing
Tekla.Structures.DrawingPointPlacing
Namespace: Tekla.Structures.Drawing
Assembly: Tekla.Structures.Drawing (in Tekla.Structures.Drawing.dll) Version: 2024.0.0+a110b435391768740483e3032720a566518c9a63
Syntax
The PlacingBase type exposes the following members.
Methods
Examples
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(); MyText.Attributes.PreferredPlacing = PreferredTextPlacingTypes.PointPlacingType(); MyText.TextString = "Text will now be without a LeaderLine."; MyText.Modify(); } else { AllViews = ((ContainerView)AllViews.Current).GetViews(); } } } }
See Also