ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Core.Geometry Namespace / Segment Class / StartPoint Property
Example

In This Topic
    StartPoint Property (Segment)
    In This Topic
    Gets the start point.
    Syntax
    Public ReadOnly Property StartPoint As MapPoint
    public MapPoint StartPoint {get;}
    Example
    StartPoint of a Polyline
    {
      // Method 1: Get the start point of the polyline by converting the polyline 
      //    into a collection of points and getting the first point
    
      // sketchGeometry is a Polyline
      // get the sketch as a point collection
      Geometry sketchGeometry = polyline; // for example
      var pointCol = ((Multipart)sketchGeometry).Points;
      // Get the start point of the line
      var firstPoint = pointCol[0];
    
      // Method 2: Convert polyline into a collection of line segments 
      //   and get the "StartPoint" of the first line segment.
      var polylineGeom = sketchGeometry as ArcGIS.Core.Geometry.Polyline;
      var polyLineParts = polylineGeom.Parts;
    
      ReadOnlySegmentCollection polylineSegments = polyLineParts.First();
    
      //get the first segment as a LineSegment
      var firsLineSegment = polylineSegments.First() as LineSegment;
    
      //Now get the start Point
      var startPointOfSegment = firsLineSegment.StartPoint;
    }
    Cubic Bezier Properties
    {
      // retrieve the bezier curve's control points
      CubicBezierSegment cb = CubicBezierBuilderEx.CreateCubicBezierSegment(bezierSegment);
      MapPoint startPt = cb.StartPoint;
      Coordinate2D ctrlPt1 = cb.ControlPoint1;
      Coordinate2D ctrlPt2 = cb.ControlPoint2;
      MapPoint endPt = cb.EndPoint;
    
      bool isCurve = cb.IsCurve;
      double len = cb.Length;
    }
    Requirements

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

    ArcGIS Pro version: 3.0 or higher.
    See Also