ArcGIS Pro 2.7 API Reference Guide
InterpolateMsBetween Method (IGeometryEngine)
Example 

ArcGIS.Core.Geometry Namespace > IGeometryEngine Interface : InterpolateMsBetween Method
The multipart to copy and update.
The index of the part to start from.
The index of the point to start from. The point index is relative to the part.
The index of the part to end with.
The index of the point to end with. The point index is relative to the part.
Generates M values by linear interpolation over a range of points.
Syntax
Function InterpolateMsBetween( _
   ByVal multipart As Multipart, _
   ByVal fromPart As Integer, _
   ByVal fromPoint As Integer, _
   ByVal toPart As Integer, _
   ByVal toPoint As Integer _
) As Multipart

Parameters

multipart
The multipart to copy and update.
fromPart
The index of the part to start from.
fromPoint
The index of the point to start from. The point index is relative to the part.
toPart
The index of the part to end with.
toPoint
The index of the point to end with. The point index is relative to the part.

Return Value

An updated version of the input multipart.
Exceptions
ExceptionDescription
The input multipart is null.
The input multipart is not M-aware.
Example
string json = "{\"hasM\":true,\"paths\":[[[0,0,-1],[1,0,0],[1,1,1],[1,2,2],[3,1,3],[5,3,4],[9,5,5],[7,6,6]]],\"spatialReference\":{\"wkid\":4326}}";
Polyline polyline = PolylineBuilder.FromJson(json);

// Interpolate between points 2 and 6
Polyline outPolyline = GeometryEngine.Instance.InterpolateMsBetween(polyline, 0, 2, 0, 6) as Polyline;
// The points of the output polyline are
// (0, 0, -1), (1, 0, 0), (1, 1, 1), (1, 2, 1.3796279833912741), (3, 1, 2.2285019604153242), (5, 3, 3.3022520459518998), (9, 5, 5), (7, 6, 6)
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

IGeometryEngine Interface
IGeometryEngine Members