Inserts copies of the input points as vertices into a Path, Ring, Polyline, or Polygon; or references to the input points into a Multipoint, Triangles, TriangleFan, or TriangleStrip.
[Visual Basic .NET] Public Sub InsertPoints ( _ ByVal pPointCollection As IPointCollection4, _ ByVal Index As Integer, _ ByRef newPoints As IPoint[] _ )
[C#] public void InsertPoints ( IPointCollection4 pPointCollection, int Index, ref IPoint[] newPoints );
[C++]
HRESULT InsertPoints(
IPointCollection4* pPointCollection,
long Index,
Array* newPoints
);
[C++]Parameters
pPointCollection [in]pPointCollection is a parameter of type IPointCollection4
Index Index is a parameter of type long newPoints [in] newPoints is a parameter of type Array
Product Availability
Description
All development languages compatible version of IPointCollection::InsertPoints .
public void InsertPoints()
{
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 MultipointClass();
//insert points to pointCollection starting at the given index
IGeometryBridge geometryBridge = new GeometryEnvironmentClass();
int index = 0;
geometryBridge.InsertPoints(pointCollection, index, ref pointArray);
//insert more points at a different index
IPoint point3 = new PointClass();
point3.PutCoords(30, 30);
IPoint point4 = new PointClass();
point4.PutCoords(40, 40);
IPoint[] secondPointArray = new IPoint[2];
secondPointArray[0] = point3;
secondPointArray[1] = point4;
int secondindex = 1;
geometryBridge.InsertPoints(pointCollection, secondindex, ref secondPointArray);
}