ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Core.Geometry Namespace / IGeometryEngine Interface / GetMinMaxM Method
The multipart from which the M-values are extracted.
The minimum M-value.
The maximum M-value.
Example

In This Topic
    GetMinMaxM Method (IGeometryEngine)
    In This Topic
    Gets the minimum and maximum M-value.
    Syntax
    Sub GetMinMaxM( _
       ByVal multipart As Multipart, _
       ByRef minM As Double, _
       ByRef maxM As Double _
    ) 
    void GetMinMaxM( 
       Multipart multipart,
       out double minM,
       out double maxM
    )

    Parameters

    multipart
    The multipart from which the M-values are extracted.
    minM
    The minimum M-value.
    maxM
    The maximum M-value.
    Exceptions
    ExceptionDescription
    Multipart is null.
    This geometry is not M-Aware.
    Spatial reference of multipartis an image coordinate system.
    Example
    Get the minimum and maximum M values - GetMinMaxM
    {
      string json = "{\"hasM\":true,\"rings\":[[[-3000,-2000,10],[-2000,-2000,15],[-1000,-2000,20],[0,-2000,0],[1000,-2000,-20],[2000,-2000,-30],[3000,-2000,10],[4000,-2000,5]]],\"spatialReference\":{\"wkid\":3857}}";
      polygon = PolygonBuilderEx.FromJson(json);
    
      GeometryEngine.Instance.GetMinMaxM(polygon, out double minM, out double maxM);
      // minM = -30 
      // maxM = 20
    
      json = "{\"hasM\":true,\"paths\":[[[-3000,-2000,10],[-2000,-2000,null],[-1000,-2000,null]]]}";
      polyline = PolylineBuilderEx.FromJson(json);
    
      GeometryEngine.Instance.GetMinMaxM(polyline, out minM, out maxM);
      // minM = 10
      // maxM = 10
    
      json = "{\"hasM\":true,\"paths\":[[[-3000,-2000,null],[-2000,-2000,null],[-1000,-2000,null]]]}";
      polyline = PolylineBuilderEx.FromJson(json);
    
      GeometryEngine.Instance.GetMinMaxM(polyline, out minM, out maxM);
      // minM = double.Nan
      // maxM = double.Nan
    }
    Requirements

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

    ArcGIS Pro version: 3.0 or higher.
    See Also