Select to view content in your preferred language

Convert VB Code to Python

3524
1
09-14-2012 05:41 AM
MarkFaulkner
New Contributor
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
Tags (2)
0 Kudos
1 Reply
JakeSkinner
Esri Esteemed Contributor
Hi Mark,

You can use the Flip Line tool to do this.  This tool will also honor selected features.
0 Kudos