DrawingCoordinateConverter Class |
The DrawingCoordinateConverter class is used to move coordinates from one view to
another. This tool takes into account the empty areas in the views.
Inheritance Hierarchy
Namespace: Tekla.Structures.Drawing.Tools
Assembly: Tekla.Structures.Drawing (in Tekla.Structures.Drawing.dll) Version: 2023.0.3
Syntax
The DrawingCoordinateConverter type exposes the following members.
Constructors
Name | Description | |
---|---|---|
DrawingCoordinateConverter | Initializes a new instance of the DrawingCoordinateConverter class |
Methods
Name | Description | |
---|---|---|
Convert(ViewBase, ViewBase, PointList) |
Converts a list of coordinate points from one view's coordinate system to another view's coordinate system.
| |
Convert(ViewBase, ViewBase, Point) |
Converts one coordinate point from one view's coordinate system to another view's coordinate system.
|
Examples
In the following example a similar polygon is drawn to a view and to a sheet:
using Tekla.Structures.Drawing; using Tekla.Structures.Drawing.Tools; using Tekla.Structures.Geometry3d; public class Example { public void Example1() { DrawingHandler DrawingHandler = new DrawingHandler(); ViewBase sheet = DrawingHandler.GetActiveDrawing().GetSheet(); DrawingObjectEnumerator Views = sheet.GetAllObjects(typeof(View)); Views.MoveNext(); View myView = Views.Current as View; PointList PointsInView = new PointList(); PointsInView.Add(new Point(0, 0)); PointsInView.Add(new Point(100, 0)); PointsInView.Add(new Point(100, 100)); Polygon polygonInView = new Polygon(myView, PointsInView); polygonInView.Insert(); PointList PointsInSheet = DrawingCoordinateConverter.Convert(myView, sheet, PointsInView); Polygon polygon = new Polygon(sheet, PointsInSheet); polygon.Insert(); } }
See Also