This document is archived and information here might be outdated.  Recommended version.


IGeometryBridge.AddPoints Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geometry > ESRI.ArcGIS.Geometry > Interfaces > IG > IGeometryBridge Interface > IGeometryBridge.AddPoints Method
ArcGIS Developer Help

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,
  SAFEARRAY(IPoint)** newPoints
);
[C++]
Parameters
pPointCollection [in]

pPointCollection is a parameter of type IPointCollection4* newPoints [in]
newPoints is a parameter of type SAFEARRAY(IPoint*)*

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