ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Core.Geometry Namespace / LineBuilderEx Class / QueryCoords Method
The start point.
The end point.
Example

In This Topic
    QueryCoords Method (LineBuilderEx)
    In This Topic
    Copies the endpoints of this builder to startPoint and endPoint'.
    Syntax
    Public Sub QueryCoords( _
       ByRef startPoint As MapPoint, _
       ByRef endPoint As MapPoint _
    ) 
    public void QueryCoords( 
       out MapPoint startPoint,
       out MapPoint endPoint
    )

    Parameters

    startPoint
    The start point.
    endPoint
    The end point.
    Remarks
    Queries the start and end points of the builder. These are the only parameters necessary to create a well-defined line.

    Line Segment

    Example
    Alter LineSegment Coordinates
    {
      MapPoint startPt = MapPointBuilderEx.CreateMapPoint(1.0, 1.0);
      MapPoint endPt = MapPointBuilderEx.CreateMapPoint(2.0, 1.0);
      // builderEx constructors don't need to run on the MCT
      LineBuilderEx lbuilderEx = new LineBuilderEx(lineSegment);
      // find the existing coordinates
      lbuilderEx.QueryCoords(out startPt, out endPt);
    
      // or use 
      //startPt = lbuilderEx.StartPoint;
      //endPt = lbuilderEx.EndPoint;
    
      // update the coordinates
      lbuilderEx.SetCoords(GeometryEngine.Instance.Move(startPt, 10, 10) as MapPoint, GeometryEngine.Instance.Move(endPt, -10, -10) as MapPoint);
    
      // or use 
      //lbuilderEx.StartPoint = GeometryEngine.Instance.Move(startPt, 10, 10) as MapPoint;
      //lbuilderEx.EndPoint = GeometryEngine.Instance.Move(endPt, -10, -10) as MapPoint;
    
      LineSegment segment2 = lbuilderEx.ToSegment() as LineSegment;
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also