ArcGIS Pro 2.8 API Reference Guide
SetAndInterpolateMsBetween Method (IGeometryEngine)
Example 

ArcGIS.Core.Geometry Namespace > IGeometryEngine Interface : SetAndInterpolateMsBetween Method
The multipart on which to set the M values.
The beginning M value.
The end M value.
Sets the Ms at the beginning and the end of the geometry and interpolates the M values between these values.
Syntax
Multipart SetAndInterpolateMsBetween( 
   Multipart multipart,
   double fromM,
   double toM
)
Function SetAndInterpolateMsBetween( _
   ByVal multipart As Multipart, _
   ByVal fromM As Double, _
   ByVal toM As Double _
) As Multipart

Parameters

multipart
The multipart on which to set the M values.
fromM
The beginning M value.
toM
The end M value.
Exceptions
ExceptionDescription
Multipart is null or empty.
This geometry is not M-Aware.
The input fromM and toM are invalid and M values cannot be interpolated.
Spatial reference of multipartis an image coordinate system.
Example
string json = "{\"hasM\":true,\"paths\":[[[-3000,-2000],[-2000,-2000],[-1000,-2000],[0,-2000],[1000,-2000],[2000,-2000],[3000,-2000],[4000,-2000]]],\"spatialReference\":{\"wkid\":3857}}";
Polyline polyline = PolylineBuilder.FromJson(json);

Polyline outPolyline = GeometryEngine.Instance.SetAndInterpolateMsBetween(polyline, 100, 800) as Polyline;
ReadOnlyPointCollection outPoints = outPolyline.Points;
// outPoints M values are { 100, 200, 300, 400, 500, 600, 700, 800 };
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

IGeometryEngine Interface
IGeometryEngine Members