ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Core.Geometry Namespace / IGeometryEngine Interface / ReverseMs Method
The input multipart.
Example

In This Topic
    ReverseMs Method (IGeometryEngine)
    In This Topic
    Reverses the order of the M-values along the multipart.
    Syntax
    Function ReverseMs( _
       ByVal multipart As Multipart _
    ) As Multipart

    Parameters

    multipart
    The input multipart.

    Return Value

    The multipart with the M-values reversed.
    Exceptions
    ExceptionDescription
    Multipart is null.
    This geometry is not M-Aware.
    Remarks
    The M-values are simply reversed. Any length:measure ratios that are present in the input multipart are not preserved.
    Example
    Reverse the order of the M-values along a multipart - ReverseMs
    string json = "{\"hasM\":true,\"paths\":[[[5,4,6],[6,4,5],[8,6,7]]],\"spatialReference\":{\"wkid\":4326}}";
    Polyline polyline = PolylineBuilderEx.FromJson(json);
    Polyline outputPolyline = GeometryEngine.Instance.ReverseMs(polyline) as Polyline;
    // The xy-coordinates in outputPolyline are not changed. 
    // The M-values in outputPolyline are: { 7, 5, 6 }
          
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.3 or higher.
    See Also