ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Core.Geometry Namespace / IGeometryEngine Interface / GetSubCurveBetweenMsEx Method
The multipart from which the subcurve will be extracted.
The M-value in the multipart to start the subcurve.
The M-value in the multipart to end the subcurve.
Information about where fromM falls relative to the input multipart.
Information about where toM falls relative to the input multipart.
Example Version

GetSubCurveBetweenMsEx Method (IGeometryEngine)
Gets a polyline and other details corresponding to the subcurve(s) between the specified M-values.
Syntax

Parameters

multipart
The multipart from which the subcurve will be extracted.
fromM
The M-value in the multipart to start the subcurve.
toM
The M-value in the multipart to end the subcurve.
fromMDetail
Information about where fromM falls relative to the input multipart.
toMDetail
Information about where toM falls relative to the input multipart.

Return Value

Polyline representing the subcurve.
Exceptions
ExceptionDescription
The input multipart is null.
The input multipart is not M-Aware.
Spatial reference of the input multipart is an image coordinate system.
Example
Get a polyline and other details corresponding to the subcurves between the specified M-values GetSubCurveBetweenMsEx
string json = "{\"hasM\":true,\"paths\":[[[-2000,0,1],[-1000,1000,-1],[-1000,0,3],[1000,1000,4],[2000,1000,5],[2000,2000,6],[3000,2000,7],[4000,0,8]]],\"spatialReference\":{\"wkid\":3857}}";
Polyline polyline = PolylineBuilderEx.FromJson(json);

// Get the subcurve between M-values 2 and 6
MSubCurveRelation fromDetail, toDetail;
Polyline subCurve = GeometryEngine.Instance.GetSubCurveBetweenMsEx(polyline, 2, 6, out fromDetail, out toDetail);
// The subcurve has one part and five points. The subcurve points are (x, y, m):
// (-1000, 250, 2), (-1000, 0, 3), (1000, 1000, 4), (2000, 1000, 5), (2000, 2000, 6)
// fromDetail = toDetail = MSubCurveRelation.MBetweenMinMax

// Get the subcurve between M-values -2 and 3.5
subCurve = GeometryEngine.Instance.GetSubCurveBetweenMsEx(polyline, -2, 3.5, out fromDetail, out toDetail);
// The subcurve has two parts and five points.
// The subcurve points in part 0 are (x, y, m): (-1000, 1000, -1), (-2000, 0, 1)
// The subcurve points in part 1 are (x, y, m): (-1000, 1000, -1), (-1000, 0, 3), (0, 500, 3.5)
// fromDetail = MSubCurveRelation.MBelowMin, toDetail = MSubCurveRelation.MBetweenMinMax
Requirements

Target Platforms: Windows 11, Windows 10

ArcGIS Pro version: 3.3 or higher.
See Also