Tekla Open API

Detailed and full API reference helps you master Tekla Open API

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

PointList Class

The PointList class defines a type safe point list.
Inheritance Hierarchy

Namespace:  Tekla.Structures.Drawing
Assembly:  Tekla.Structures.Drawing (in Tekla.Structures.Drawing.dll) Version: 2018.1.0.0 (2018.1.0.0)
Syntax
[SerializableAttribute]
public sealed class PointList : CollectionBase

The PointList type exposes the following members.

Constructors
  Name Description
Public method PointList
Initializes a new instance of the PointList class
Top
Properties
  Name Description
Public property Item
Gets or sets the point at the specified index.
Top
Methods
  Name Description
Public method Add
Adds a new point to the end of the point list.
Public method AddRange
Appends all points from another point list to the end of this point list.
Public method Contains
Checks if the given point is in the list.
Public method GetRange
Gets a part of the point list.
Public method IndexOf(Point)
Gets the index of the specified point.
Public method IndexOf(Point, Int32)
Gets the index of the specified point between the index to start the search from and the end of the list.
Public method IndexOf(Point, Int32, Int32)
Gets the index of the specified point between the index to start the search from and startIndex + count.
Public method Insert
Inserts the point to the specified index.
Public method IsEqual
Compares the current object with an object of the same type.
Public method LastIndexOf(Point)
Searches for the last occurence of the point in the list.
Public method LastIndexOf(Point, Int32)
Searches for the last occurence of the point in the list.
Public method LastIndexOf(Point, Int32, Int32)
Searches for the last occurence of the point in the list.
Public method Remove
Removes the first occurence of the point from the list.
Public method RemoveRange
Removes a range of items starting from the given index.
Public method ToArray
Copies the points to a point array.
Top
Examples
The following example adds a few points to the point list and inserts a new polygon:
using Tekla.Structures.Drawing;
using Tekla.Structures.Geometry3d;

public class Example
{
       public void Example1()
       {
           Drawing MyDrawing = new GADrawing();
           View MyView = new View(MyDrawing.GetSheet(), new CoordinateSystem(), new CoordinateSystem(),
               new AABB(new Point(), new Point(30000, 30000, 10000)));

           PointList MyPointList = new PointList();

           MyPointList.Add(new Point(0.0, 0.0, 0.0));
           MyPointList.Add(new Point(100.0, 0.0, 0.0));
           MyPointList.Add(new Point(100.0, 500.0, 0.0));
           MyPointList.Add(new Point(0.0, 500.0, 0.0));

           Polygon MyPolygon = new Polygon(MyView, MyPointList);
           MyPolygon.Insert();
       }
}
See Also