ArcObjects Library Reference (Geometry)  

IGeometryBridge2.SetWKSPoints Method

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

[Visual Basic .NET]
Public Sub SetWKSPoints ( _
    ByVal pPointCollection As IPointCollection4, _
    ByRef pointStructures As WKSPoint[] _
)
[C#]
public void SetWKSPoints (
    IPointCollection4 pPointCollection,
    ref WKSPoint[] pointStructures
);
[C++]
HRESULT SetWKSPoints(
  IPointCollection4* pPointCollection,
  Array* pointStructures
);
[C++]

Parameters

pPointCollection [in]

  pPointCollection is a parameter of type IPointCollection4

pointStructures [in]   pointStructures is a parameter of type Array

Product Availability

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

    public void SetWKSPoints()
    {
        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);
        //set points  - overrides all existing 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;
        }
        geometryBridge.SetWKSPoints(pointCollection, ref secondPointArray);
    }

See Also

IGeometryBridge2 Interface