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


IPointCollection.AddPointCollection Method (ArcObjects .NET 10.7 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geometry > ESRI.ArcGIS.Geometry > Interfaces > IP > IPointCollection Interface > IPointCollection.AddPointCollection Method
ArcGIS Developer Help

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

.NET Samples

Custom reshape polyline edit task