ArcObjects Library Reference (Geometry)  

ICircularArc.QueryCenterPoint Method

Copies the center point of this circular arc to the input point.

[Visual Basic .NET]
Public Sub QueryCenterPoint ( _
    ByVal Center As IPoint _
)
[C#]
public void QueryCenterPoint (
    IPoint Center
);
[C++]
HRESULT QueryCenterPoint(
  IPoint* Center
);
[C++]

Parameters

Center

  Center is a parameter of type IPoint

Product Availability

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

Description

Returns the Center Point of the CircularArc.  The Center Point is the Point equidistant from all other points on the CircularArc, and it is the point from which the Radius is measured.

Remarks

Note: The output geometry must be co-created prior to the query. The output geometry is not co-created by the method; it is populated. This can be used in performance critical situations. For example, creating the geometry only once outside a loop and use the query method could improve performance.

CircularArc QueryCenterPoint Example

[C#]

private void showCenterPoint()
{
    //Create three points to draw an arc through.
    IPoint point1 = new ESRI.ArcGIS.Geometry.Point();
    IPoint point2 = new ESRI.ArcGIS.Geometry.Point();
    IPoint point3 = new ESRI.ArcGIS.Geometry.Point();
    point1.PutCoords(200, 200);
    point2.PutCoords(200, 300);
    point3.PutCoords(300, 300);
    //Construct a Three Point Arc.
    IConstructCircularArc constructionArc = new CircularArc() as IConstructCircularArc;
    constructionArc.ConstructThreePoints(point1, point2, point3, false);
    ICircularArc circularArc = constructionArc as ICircularArc;

    System.Windows.Forms.MessageBox.Show(
        "Values from QueryCenterPoint are: \n" +
        "Center Point X coord: " + circularArc.CenterPoint.X + ",\n" +
        "Center Point Y coord: " + circularArc.CenterPoint.Y
        );
   
}

See Also

ICircularArc Interface

.NET Related Topics

How to use some basic properties and methods on ICircularArc |