ArcGIS Pro 3.8 API Reference Guide
ArcGIS.Core.Geometry Namespace / EnvelopeBuilderEx Class / MMax Property
Example

In This Topic
    MMax Property (EnvelopeBuilderEx)
    In This Topic
    Gets or sets the M maximum of this instance.
    Syntax
    public double MMax {get; set;}
    Public Property MMax As Double
    Remarks
    If the value passed in to set MMax is less than MMin, , then MMin will also be set to this value. To set both the minimum and maximum values simultaneously, use SetMCoords.
    Example
    Add an offset value to each of the M-values - OffsetMs
    {
      // Create a polyline and add an offset of 2 to each of the M-values
      MapPointBuilderEx pointBuilder = new(0, 0)
      {
        M = 1
      };
      MapPoint point1 = pointBuilder.ToGeometry();
    
      pointBuilder.SetValues(2, 2);
      pointBuilder.M = 3;
      MapPoint point2 = pointBuilder.ToGeometry();
    
      polyline = PolylineBuilderEx.CreatePolyline([point1, point2], AttributeFlags.HasM);
      ;
    
      Polyline outPolyline = GeometryEngine.Instance.OffsetMs(polyline, 2) as Polyline;
      // The xy-values of the points in outPolyline are the same as the points in the input polyline.
      // The M-values in outPolyline are { 3, 5 }
    
      // Create an envelope and add an offset of 25 to each of the M-values
      EnvelopeBuilderEx envelopeBuilder = new(-5, 1, 2, 4)
      {
        MMin = 10,
        MMax = 20
      };
      Envelope envelope = envelopeBuilder.ToGeometry();
    
      Envelope outEnvelope = GeometryEngine.Instance.OffsetMs(envelope, 25) as Envelope;
      // The xy-values of the points in outEnvelope are the same as the points in the input envelope.
      // outEnvelope.MMin = 35, outEnvelope.MMax = 45
    
      // Add a negative offset to the M-values of the envelope
      outEnvelope = GeometryEngine.Instance.OffsetMs(envelope, -10) as Envelope;
      // The xy-values of the points in outEnvelope are the same as the points in the input envelope.
      // outEnvelope.MMin = 0, outEnvelope.MMax = 10
    }
    Requirements

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

    ArcGIS Pro version: 3.0 or higher.
    See Also