ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Core.Geometry Namespace / GeometryEngine Class / MultiplyMs Method
The input geometry. Cannot be a GeometryBag.
The factor by which each M-value will be multiplied.

In This Topic
    MultiplyMs Method (GeometryEngine)
    In This Topic
    Multiplies all the M-values by a factor.
    public Geometry MultiplyMs( 
       Geometry geometry,
       double factor
    Public Function MultiplyMs( _
       ByVal geometry As Geometry, _
       ByVal factor As Double _
    ) As Geometry


    The input geometry. Cannot be a GeometryBag.
    The factor by which each M-value will be multiplied.

    Return Value

    A geometry with all the M-values multiplied by a factor. If factor is NaN or geometry is empty, then the input geometry is returned unchanged.
    Geometry is null.
    This geometry is not M-Aware.
    This method is not implemented for GeometryBag.
    Multiply all M-values by a factor - MultiplyMs
    // Create a multipoint and multiply M-values by 6
    Coordinate2D[] coords = new Coordinate2D[] { new Coordinate2D(-4, 4), new Coordinate2D(-1, 1), new Coordinate2D(2, 6),
      new Coordinate2D(-8, 2), new Coordinate2D(5, -3), new Coordinate2D(7, 2), new Coordinate2D(5, 3), new Coordinate2D(3, -1) };
    double[] ms = new double[] { 1, 2, 3, 4, 5, 6, 7, 8 };
    MultipointBuilderEx builder = new MultipointBuilderEx(coords);
    builder.Ms = ms;
    builder.HasM = true;
    Multipoint multipoint = builder.ToGeometry();
    Multipoint outMultipoint = GeometryEngine.Instance.MultiplyMs(multipoint, 6) as Multipoint;
    // The xy-values of the points in outMultipoint are the same as the points in the input multipoint.
    // The M-values in outMultipoint are { 6, 12, 18, 24, 30, 36, 42, 48 }

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.3 or higher.
    See Also