ArcObjects Library Reference (Geometry)  

IGeometryBridge2.InsertWKSPoints Method

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,
  Array* 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 Array

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.
[C#]

    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);
    }

See Also

IGeometryBridge2 Interface