[GIS] Populating field with max M value of feature using Python in ArcGIS Field Calculator

arcgis-10.0arcgis-desktopfield-calculatorpython-parser

I need to calculate the max M value for a line feature using Python in ArcGIS 10 Field Calculator but I cannot figure it out. In 9.3 I used the follow VBA expression…

**Pre-Logic VBA Script Code:**
dim m as imcollection
set m = [shape]
dim d as double 
d = m.mmax

**EndStation =:**
d

Best Answer

use field calc to return the MAX M measures:

!Shape.extent.MMax!

use field calc to return the Min M measures:

!Shape.extent.MMin!

you can then calculate the M-length of the line using subtraction.