HOW TO
You can use Avenue to display information on the ArcView status bar. This document uses an example to display decimal degree coordinates of a location on a projected view.
Code:
if(av.GetActiveDoc.AsString = "View1") then
av.DelayedRun("Script2", nil, 0.5)
end
Code:
theView = av.GetProject.FindDoc("View1")
viewprojection = theview.getprojection
p = theView.GetDisplay.ReturnUserPoint.ReturnUnprojected(viewProjection)
x = p.GetX
y = p.GetY
lon = x.SetFormat("ddd.ddddd")
lat = y.SetFormat("dd.ddddd")
msg = ("Position = "+lon.AsString+", "+lat.AsString)
av.ShowMsg(msg)
System.RefreshWindows
Note:
If you want to assign the tool and icon, double-click the Icon field and select the desired representation.
Note:
This example is hard coded to work with a view named View1, and scripts named Script1 and Script2. You will need to edit the scripts if you wish to use documents with different names.
Article ID:000002625
Get help from ArcGIS experts
Download the Esri Support App