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

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

IGeometryBridge.GetPoints Method

Populates an array with references to points in the Multipoint. The QueryPoints method on IPointCollection makes copies of the points.

[Visual Basic .NET]
Public Sub GetPoints ( _
    ByVal pPointCollection As IPointCollection4, _
    ByVal Index As Integer, _
    ByRef Points As IPoint[] _
public void GetPoints (
    IPointCollection4 pPointCollection,
    int Index,
    ref IPoint[] Points
HRESULT GetPoints(
  IPointCollection4* pPointCollection,
  long Index,
  SAFEARRAY(IPoint)** Points
pPointCollection [in]

pPointCollection is a parameter of type IPointCollection4* Index
Index is a parameter of type long Points [in, out]
Points is a parameter of type SAFEARRAY(IPoint*)*

Product Availability

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


All development languages compatible version of IPointCollection::GetPoints .


    public void GetPoints()
        //prepare inputPoints
        IPoint point1 = new PointClass();
        point1.PutCoords(10, 10);
        IPoint point2 = new PointClass();
        point2.PutCoords(20, 20);
        IPoint[] inputPointArray = new IPoint[2];
        inputPointArray[0] = point1;
        inputPointArray[1] = point2;
        IPointCollection4 pointCollection = new MultipointClass();

        //add points to pointCollection
        IGeometryBridge geometryBridge = new GeometryEnvironmentClass();
        geometryBridge.AddPoints(pointCollection, ref inputPointArray);

        //get Points
        int index = 0;
        IPoint[] outputPointArray = new IPoint[inputPointArray.Length - index];
        geometryBridge.GetPoints(pointCollection, index, ref outputPointArray);
        for (int i = 0; i < outputPointArray.Length; i++)
            IPoint currentPoint = outputPointArray[i];
            if (currentPoint == null)
                System.Windows.Forms.MessageBox.Show("Current point = null");
                System.Windows.Forms.MessageBox.Show("X = " + currentPoint.X + ", Y = " + currentPoint.Y);

See Also

IGeometryBridge Interface