This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ArcObjects namespaces > Geometry > ESRI.ArcGIS.Geometry > Interfaces > IP > IPointCollection Interface > IPointCollection.AddPointCollection Method (ArcObjects .NET 10.5 SDK) |
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
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.
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;
}