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


IGeometryBridge.InsertWKSPointZs Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geometry > ESRI.ArcGIS.Geometry > Interfaces > IG > IGeometryBridge Interface > IGeometryBridge.InsertWKSPointZs Method
ArcGIS Developer Help

IGeometryBridge.InsertWKSPointZs Method

Inserts new vertices/points into this Path, Ring, Polyline, Polygon, Multipoint, Triangles, TriangleFan, TriangleStrip, or MultiPatch.

[Visual Basic .NET]
Public Sub InsertWKSPointZs ( _
    ByVal pPointCollection As IPointCollection4, _
    ByVal Index As Integer, _
    ByRef newPoints As WKSPointZ[] _
)
[C#]
public void InsertWKSPointZs (
    IPointCollection4 pPointCollection,
    int Index,
    ref WKSPointZ[] newPoints
);
[C++]
HRESULT InsertWKSPointZs(
  IPointCollection4* pPointCollection,
  long Index,
  SAFEARRAY(WKSPointZ)* 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 SAFEARRAY(WKSPointZ)*

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

All development languages compatible version of IPointCollection4::InsertWKSPointsZs .

[C#]

    public static void InsertWKSPointZs()
    {
        int length = 10;
        WKSPointZ[] pointArray = new WKSPointZ[length];
        for (int i = 0; i < length; i++)
        {
            pointArray[i] = new WKSPointZ();
            pointArray[i].X = i * 10;
            pointArray[i].Y = i * 10;
            pointArray[i].Z = i * 10;
        }
        IPointCollection4 pointCollection = new MultipointClass();
        // Make pointcollection ZAware
        IZAware zAware = (IZAware)pointCollection;
        zAware.ZAware = true;
        //add points to pointCollection
        IGeometryBridge geometryBridge = new GeometryEnvironmentClass();
        geometryBridge.AddWKSPointZs(pointCollection, ref pointArray);

        //insert points
        int secondArrayLength = 5;
        WKSPointZ[] secondPointArray = new WKSPointZ[secondArrayLength];
        for (int i = 0; i < secondArrayLength; i++)
        {
            secondPointArray[i] = new WKSPointZ();
            secondPointArray[i].X = i * 33;
            secondPointArray[i].Y = i * 33;
            secondPointArray[i].Z = i * 33;
        }
        int index = 1;
        geometryBridge.InsertWKSPointZs(pointCollection, index, ref secondPointArray);
    }

 

See Also

IGeometryBridge Interface