faylcon

Convert VB Code to Python

Discussion created by faylcon on Sep 14, 2012
Latest reply on Sep 14, 2012 by jskinner-esristaff
I have some VB code that I used in 9.3.1 to flip selected polyline orientation. It no longer works in 10.1, is there a Python equivalent I can use to calculate on the [Shape] field?

Pre-logic Script Code:

Dim pCurve As ICurve
If (Not IsNull([Shape])) Then
  Set pCurve = [Shape]
  If (Not pCurve.IsEmpty) Then
    pCurve.ReverseOrientation
  End If

Shape=
pCurve

Thanks,
Mark

Outcomes