I have a multipart polyline in an ArcGIS Pro 2.9.2 feature class:
(NAD83 UTM 17N)
I can set the M-values to the cumulative distance of the line by using the Set As Distance tool (setting "Starting M" to zero):
That works as expected. Part #2's M-values are in the correct order (ascending).
However, if I do a different test, the results are unexpected:
Now, part #2's M-values are in the incorrect order (descending):
Question:
Why are the M-values in the incorrect order? (descending)
I would expect the M-value order to be the same as the vertex index's order (ascending).
Thanks!
Set as Distance seems to try to minimize the distance. In your second case, V2 is closer to V4 than to V3, so it continues the route that way.
That feels kinda wrong, but maybe there are good reasons for that behavior, I don't know.
Workaround:
Esri confirmed it's a defect: BUG-000148390.