stuart.blumberg

Derive Min/Max Measure from PolylineM

Discussion created by stuart.blumberg on Aug 30, 2013
Latest reply on Dec 3, 2014 by jg1295
Hi,

I am trying to derive the minimum and maximum measure for each segment from a PolylineM feature.  In the past I used the below VB code from an old colleague in ArcMap 9.3.1 which worked perfectly.  I am now trying to do this in Model Builder in 10.1, however, I understand 10.1 does not support VB codes anymore.  I am a bit weak on coding so maybe someone can help me rework this code in Python?  Or if they know a better way to do this?  Thanks!

VB Code:

Dim pGeometry As IGeometry
Dim dMMax As Double
Dim pMAware As IMAware
Dim pMColl As IMCollection
If (Not IsNull([Shape])) Then
  Set pGeometry = [Shape]
  If (Not pGeometry.IsEmpty) Then
    Set pMAware = pGeometry
    If pMAware.MAware Then
      Set pMColl = pGeometry
      dMMax = pMColl.MMax
    End If
  End If
End If

Outcomes