ArcGIS Pro 2.8 API Reference Guide
MovePointAlongLine Method (GeometryEngine)
Example 

ArcGIS.Core.Geometry Namespace > GeometryEngine Class : MovePointAlongLine Method
The multipart along which the point will be moved.
The distance to move the point.
Set the asRatio flag to be true if you want the distance to be a ratio of the curve length.
The offset distance.
Determines how and from where a segment is to be extended.
Constructs a point the specified distance along a polyline or polygon.
Syntax
Public Function MovePointAlongLine( _
   ByVal multipart As Multipart, _
   ByVal distanceAlong As Double, _
   ByVal asRatio As Boolean, _
   ByVal offset As Double, _
   ByVal extension As SegmentExtension _
) As MapPoint

Parameters

multipart
The multipart along which the point will be moved.
distanceAlong
The distance to move the point.
asRatio
Set the asRatio flag to be true if you want the distance to be a ratio of the curve length.
offset
The offset distance.
extension
Determines how and from where a segment is to be extended.
Exceptions
ExceptionDescription
Multipart is null or empty.
Occurs if asRatio is true and the geometry has a 2d and 3d distance of 0.
Remarks
A positive offset distance will create a point on the right side of the curve and a negative offset will create a point on the left side of the curve.
Example
LineSegment line = LineBuilder.CreateLineSegment(MapPointBuilder.CreateMapPoint(0, 3), MapPointBuilder.CreateMapPoint(5.0, 3.0));
Polyline polyline = PolylineBuilder.CreatePolyline(line);
bool simple = GeometryEngine.Instance.IsSimpleAsFeature(polyline);

// ratio = false
MapPoint pt = GeometryEngine.Instance.MovePointAlongLine(polyline, 1.0, false, 0.0, SegmentExtension.NoExtension);
// pt = 1.0, 3.0

pt = GeometryEngine.Instance.MovePointAlongLine(polyline, 1.0, false, -1.0, SegmentExtension.NoExtension);
// pt = 1.0, 4.0

pt = GeometryEngine.Instance.MovePointAlongLine(polyline, 1.0, false, 2.0, SegmentExtension.NoExtension);
// pt = 1.0, 1.0

// ratio = true
pt = GeometryEngine.Instance.MovePointAlongLine(polyline, 0.5, true, 0, SegmentExtension.NoExtension);
// pt = 2.5, 3.0

// move past the line
pt = GeometryEngine.Instance.MovePointAlongLine(polyline, 7, false, 0, SegmentExtension.NoExtension);
// pt = 5.0, 3.0

// move past the line with extension at "to" point
pt = GeometryEngine.Instance.MovePointAlongLine(polyline, 7, false, 0, SegmentExtension.ExtendEmbeddedAtTo);
// pt = 7.0, 3.0

// negative distance with extension at "from" point
pt = GeometryEngine.Instance.MovePointAlongLine(polyline, -2, false, 0, SegmentExtension.ExtendEmbeddedAtFrom);
// pt = -2.0, 3.0

// ratio = true
pt = GeometryEngine.Instance.MovePointAlongLine(polyline, 0.5, true, 0, SegmentExtension.NoExtension);
// pt = 2.5, 3.0

// line with Z
List<Coordinate3D> coords3D = new List<Coordinate3D> { new Coordinate3D(0, 0, 0), new Coordinate3D(1113195, 1118890, 5000) };
Polyline polylineZ = PolylineBuilder.CreatePolyline(coords3D, SpatialReferences.WebMercator);
// polylineZ.HasZ = true

// ratio = true, no offset
pt = GeometryEngine.Instance.MovePointAlongLine(polylineZ, 0.5, true, 0, SegmentExtension.NoExtension);
// pt.X = 556597.5
// pt.Y = 559445
// pt.Z = 2500

// ratio = true, past the line with "to" extension, no offset
pt = GeometryEngine.Instance.MovePointAlongLine(polylineZ, 1.5, true, 0, SegmentExtension.ExtendEmbeddedAtTo);
// pt.X = 1669792.5
// pt.Y = 1678335
// pt.Z = 7500

// ratio = true, negative distance past the line with no extension, no offset
pt = GeometryEngine.Instance.MovePointAlongLine(polylineZ, -1.5, true, 0, SegmentExtension.NoExtension);
// pt.X = 0
// pt.Y = 0
// pt.Z = -7500

// polyline with Z but 2d distance = 0
MapPoint pt3 = MapPointBuilder.CreateMapPoint(5, 5, 0);
MapPoint pt4 = MapPointBuilder.CreateMapPoint(5, 5, 10);
List<MapPoint> pts = new List<MapPoint>() { pt3, pt4 };

polyline = PolylineBuilder.CreatePolyline(pts);
// polyline.HasZ = true
// polyline.Length3D = 10
// polyline.Length = 0

MapPoint result = GeometryEngine.Instance.MovePointAlongLine(polyline, 2, false, 0, SegmentExtension.NoExtension);
// result = 5, 5, 2

// polyline with length2d = 0 and length3d = 0
MapPoint pt5 = MapPointBuilder.CreateMapPoint(5, 5, 10);
MapPoint pt6 = MapPointBuilder.CreateMapPoint(5, 5, 10);
pts.Clear();
pts.Add(pt5);
pts.Add(pt6);

polyline = PolylineBuilder.CreatePolyline(pts);
// polyline.HasZ = true
// polyline.Length3D = 0
// polyline.Length = 0

result = GeometryEngine.Instance.MovePointAlongLine(polyline, 3, true, 0, SegmentExtension.NoExtension);
// result = 5, 5, 10

result = GeometryEngine.Instance.MovePointAlongLine(polyline, 3, true, 0, SegmentExtension.ExtendEmbeddedAtFrom);
// result = 5, 5, 10

// polyline with Z and M
List<MapPoint> inputPoints = new List<MapPoint>()
{
    MapPointBuilder.CreateMapPoint(1, 2, 3, 4),
    MapPointBuilder.CreateMapPoint(1, 2, 33, 44),
};

Polyline polylineZM = PolylineBuilder.CreatePolyline(inputPoints, SpatialReferences.WGS84);
// polylineZM.HasZ = true
// polylineZM.HasM = true

// ratio = true, no offset
MapPoint pointAlong = GeometryEngine.Instance.MovePointAlongLine(polylineZM, 0.5, true, 0, SegmentExtension.NoExtension);
// pointAlong = 1, 2, 18, 24

// ratio = true with offset
pointAlong = GeometryEngine.Instance.MovePointAlongLine(polylineZM, 0.2, true, 2.23606797749979, SegmentExtension.NoExtension);
// pointAlong = 1, 2, 9, 12
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

GeometryEngine Class
GeometryEngine Members