This document is archived and information here might be outdated. Recommended version. |
Inserts new vertices/points into this Path, Ring, Polyline, Polygon, Multipoint, Triangles, TriangleFan, TriangleStrip, or MultiPatch.
[Visual Basic .NET] Public Sub InsertWKSPoints ( _ ByVal pPointCollection As IPointCollection4, _ ByVal Index As Integer, _ ByRef pointStructures As WKSPoint[] _ )
[C#] public void InsertWKSPoints ( IPointCollection4 pPointCollection, int Index, ref WKSPoint[] pointStructures );
[C++]
HRESULT InsertWKSPoints(
IPointCollection4* pPointCollection,
long Index,
SAFEARRAY(WKSPoint)* pointStructures
);
[C++] Parameters pPointCollection [in]
pPointCollection is a parameter of type IPointCollection4* Index [in]
Index is a parameter of type long pointStructures [in]
pointStructures is a parameter of type SAFEARRAY(WKSPoint)*
public void InsertWKSPoints()
{
int length = 10;
WKSPoint[] pointArray = new WKSPoint[length];
for (int i = 0; i < length; i++)
{
pointArray[i] = new WKSPoint();
pointArray[i].X = i * 10;
pointArray[i].Y = i * 10;
}
IPointCollection4 pointCollection = new MultipointClass();
//add points to pointCollection
IGeometryBridge2 geometryBridge = new GeometryEnvironmentClass();
geometryBridge.AddWKSPoints(pointCollection, ref pointArray);
//insert points
int secondArrayLength = 5;
WKSPoint[] secondPointArray = new WKSPoint[secondArrayLength];
for (int i = 0; i < secondArrayLength; i++)
{
secondPointArray[i] = new WKSPoint();
secondPointArray[i].X = i * 33;
secondPointArray[i].Y = i * 33;
}
int index = 1;
geometryBridge.InsertWKSPoints(pointCollection, index, ref secondPointArray);
}