ArcObjects Library Reference (Geometry)  

IPointCollection.AddPointCollection Method

Adds copies of points in the input point collection to this Path, Ring, Polyline, or Polygon; or adds references to the points in the collection to this Multipoint, TriangleFan, or TriangleStrip.

[Visual Basic .NET]
Public Sub AddPointCollection ( _
    ByVal newPoints As IPointCollection _
)
[C#]
public void AddPointCollection (
    IPointCollection newPoints
);
[C++]
HRESULT AddPointCollection(
  IPointCollection* newPoints
);
[C++]

Parameters

newPoints

  newPoints is a parameter of type IPointCollection

Product Availability

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

Description

Adds a PointCollection of Points to the end of the PointCollection.  The resulting PointCollection does not retain the division between the old PointCollection and the additional PointCollection.

[C#]

    public static IMultipoint CreateMPFromPolygons(IPolygon polygon1, IPolygon polygon2)
    {

        IMultipoint pSourceMultipoint = new MultipointClass();
        IPointCollection pSourceMultipointCollection = (IPointCollection)pSourceMultipoint;

        IPointCollection pointCollectionPoly1 = (IPointCollection)polygon1;
        IPointCollection pointCollectionPoly2 = (IPointCollection)polygon2;

        pSourceMultipointCollection.AddPointCollection(pointCollectionPoly1);
        pSourceMultipointCollection.AddPointCollection(pointCollectionPoly2);

        return (IMultipoint)pSourceMultipointCollection;
    }

See Also

IPointCollection Interface