Quantcast
Channel: Forums - ArcView 3.x
Viewing all articles
Browse latest Browse all 20

What language do I convert my Avenue scripts to in ArcGIS 10.1 Desktop?

$
0
0
I am moving to ArcGIS 10.1 Desktop Basic from Arcview 3.2a. What language do I use to rewrite all my Avenue scripts? I use custom toolbars and a lot of user selection of objects from views. Below is a typical script that will flip the direction of a line for correct routing of a road centerline:

theView = av.GetActiveDoc
theDisplay = theView.GetDisplay
theTheme = theView.GetActiveThemes.Get(0)
theRectangle = theView.ReturnUserRect

'Select a line
If (theRectangle.IsNull) then
thePoint = theView.GetDisplay.ReturnUserPoint
theTheme.SelectByPoint(thePoint,#VTAB_SELTYPE_NEW)
else
theTheme.SelectByRect(theRectangle,#VTAB_SELTYPE_NEW)
end

theFTab = theTheme.GetFTab
field1 = theFTab.FindField("Shape")

for each rec in theFTab.GetSelection
aline = theFTab.ReturnValue(field1,rec)

'SET THE FLIPPED LINE TO A VARIABLE
newline = aline.flip

'SET THE SHAPE FIELD'S VALUE TO NEWLINE
theFTab.SetValue(field1, rec, newline)
end

theFTab.GetSelection.ClearAll

'INVALIDATE THE VIEW
theView.invalidate
theDisplay.Flush

Thanks in advance for your help!

Viewing all articles
Browse latest Browse all 20

Trending Articles