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


IGeometryBridge.SetWKSPointZs 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.SetWKSPointZs Method
ArcGIS Developer Help

IGeometryBridge.SetWKSPointZs Method

Replaces all vertices/points of this Path, Ring, Polyline, Polygon, Multipoint, Triangles, TriangleFan, TriangleStrip, or MultiPatch with new ones.

[Visual Basic .NET]
Public Sub SetWKSPointZs ( _
    ByVal pPointCollection As IPointCollection4, _
    ByRef pointStructures As WKSPointZ[] _
)
[C#]
public void SetWKSPointZs (
    IPointCollection4 pPointCollection,
    ref WKSPointZ[] pointStructures
);
[C++]
HRESULT SetWKSPointZs(
  IPointCollection4* pPointCollection,
  SAFEARRAY(WKSPointZ)* pointStructures
);
[C++]
Parameters
pPointCollection [in]

pPointCollection is a parameter of type IPointCollection4* pointStructures [in]
pointStructures 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::SetWKSPointsZs .

[C#]

    public void SetWKSPointZs()
    {
        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();
        IZAware zAware = (IZAware)pointCollection;
        zAware.ZAware = true;
        //add points to pointCollection
        IGeometryBridge geometryBridge = new GeometryEnvironmentClass();
        geometryBridge.AddWKSPointZs(pointCollection, ref pointArray);
        PrintSetWKSPointZs(pointCollection, "PointCollection before setting points");

        //set points  - overrides all existing 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;
        }
        geometryBridge.SetWKSPointZs(pointCollection, ref secondPointArray);
        PrintSetWKSPointZs(pointCollection, "PointCollection after setting points");
    }

See Also

IGeometryBridge Interface