ArcObjects Library Reference (Geometry)  

IGeometryBridge.AddPoints Method

Adds copies of the input points as vertices to this Path, Ring, Polyline, or Polygon; or references to the input points to this Multipoint, Triangles, TriangleFan, or TriangleStrip.

[Visual Basic .NET]
Public Sub AddPoints ( _
    ByVal pPointCollection As IPointCollection4, _
    ByRef newPoints As IPoint[] _
)
[C#]
public void AddPoints (
    IPointCollection4 pPointCollection,
    ref IPoint[] newPoints
);
[C++]
HRESULT AddPoints(
  IPointCollection4* pPointCollection,
  Array* newPoints
);
[C++]

Parameters

pPointCollection [in]

  pPointCollection is a parameter of type IPointCollection4

newPoints [in]   newPoints is a parameter of type Array

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

All development languages compatible version of IPointCollection::AddPoints .

[C#]

    public void AddPoints()
    {
        IPoint point1 = new PointClass();
        point1.PutCoords(10, 10);
        IPoint point2 = new PointClass();
        point2.PutCoords(20, 20);
        IPoint[] pointArray = new IPoint[2];
        pointArray[0] = point1;
        pointArray[1] = point2;
        IPointCollection4 pointCollection = new PolylineClass();
        //add points to pointCollection

        IGeometryBridge geometryBridge = new GeometryEnvironmentClass();
        geometryBridge.AddPoints(pointCollection, ref pointArray);
        System.Windows.Forms.MessageBox.Show(pointCollection.PointCount + " points added to PointCollection");
    }

See Also

IGeometryBridge Interface

.NET Related Topics

Using IGeometryBridge or IGeometryBridge2 |