
|
|
|
|
|
|
Avenue is the programming
language used in ArcView to allow the user customize
and extend the functionality of ArcView. Avenue is
used to customize the ArcView GIS default interface
by changing the buttons, tools and menus (collectively
called controls), edit tables and text files, manipulate
views and themes,
create new scripts to automate tasks and solve problems
that are not handled through ArcView’s core interface,
and create dialogs and extensions for an application
that are customized to your specific needs or tasks
using the Dialog Designer extension. Since Avenue
is an Object Oriented Programming language it is built
upon objects and requests. Because of this structure
it is easy for programmers of other OOP languages
to learn. One of ArcView's components is a script
editor where one can write, edit, load, and debug
the scripts.
|
CUSTOMIZING
THE DEFAULT GUI
Each ArcView document has an associated GUI, called
a docGUI (or
document graphical user interface). The document GUI
is the collection of controls used to interact with
each document. Each DocGUI is comprised of a menu bar,
a button bar, a toolbar and a set of popup menus. The
three horizontal bars are also called control sets and
are part of the ControlSet class in Avenue. The set
of popup menus belong to a control set called a PopupSet.
A control set defines general properties and methods
for collections of Controls. The individual menu choices,
buttons, and tools contained in each of the control
sets, are called controls. Menus and Popups are made
up of controls called menu choices. Each control has
an Avenue script associated with it. You can view, copy,
edit, and replace every control’s script. |
|
SAVING
A SCRIPT
You can save scripts with your current
project or store them separately from the project
as text files. It is a good idea to build a library
of scripts you would like to maintain. When you save
your current project, any scripts you have created
are saved to the project file. The Write Text File button
writes a text file with the contents of the active
Script Editor window. The text file is written to
a directory of your choice and appended with the .ave
extension. The Write Text File button allows you to
save your script easily access it later for re-use
or send it to someone as an ASCII file. Embedding
a script moves the completed script from the Script
Editor to the project's script list. When this is
done, the script is saved with the project and the
Script Editor is removed. You may choose to embed
your scripts to make them less accessible to users
and to speed up script access in a project. Embedding
a script only places it in a directory not easily
accessible from the project window. If you want to
protect your script even more, choose to encrypt it.
Encrypting scripts allow you to protect your work
in Avenue coding by making your source code completely
unreadable. Unlike an embedded script, a user cannot
load an encrypted script into a Script Editor using
the Script Manager. To encrypt scripts, you use Avenue
code.
|
| |

For those just beginning
writing scripts in Avenue, ESRI's website has a wealth
of scripts
free to download and modify. You
can also submit your own scripts to the list so that
others can benefit from your work. ESRI's website also
has a very helpful community
help board where you can post questions
concerning any ESRI product. In our research experiences
we have found the feedback timely and helpful. |
|
|
|