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
SystemObject
  Tekla.Structures.Drawing.ToolsDrawingCoordinateConverter

Namespace:  Tekla.Structures.Drawing.Tools
Assembly:  Tekla.Structures.Drawing (in Tekla.Structures.Drawing.dll) Version: 2023.0.3
Syntax
[SerializableAttribute]
public class DrawingCoordinateConverter

The DrawingCoordinateConverter type exposes the following members.

Constructors
  NameDescription
Public methodDrawingCoordinateConverter
Initializes a new instance of the DrawingCoordinateConverter class
Top
Methods
  NameDescription
Public methodStatic memberConvert(ViewBase, ViewBase, PointList)
Converts a list of coordinate points from one view's coordinate system to another view's coordinate system.
Public methodStatic memberConvert(ViewBase, ViewBase, Point)
Converts one coordinate point from one view's coordinate system to another view's coordinate system.
Top
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
Was this helpful?
The feedback you give here is not visible to other users. We use your comments to improve the content.
Previous
Next