
| Home | Portfolio | Resume | Photos |
Lesson 1: Basics of ArcGIS Customization
Jim Kompanek
Introduction
There were two primary goals contained within lesson; a) customization of the ArcGIS interface and b) the basics of programming with ArcObjects. For the first goal, we were given the scenario of setting up workstation in order to provide a basic platform for a potential layman to gain an introduction into GIS. The second goal was to develop a basic introduction to ArcObjects by using the Visual Basic Editor within ArcView.
Customization
As mentioned above, the first goal of the project was to setup a basic ArcMap interface that provided a basic introduction to GIS, which uses a "limited set of menus, buttons, and tools" (Enderlein 2008a) This was accomplished by double clicking on any blank, gray space within the ArcMap window. Doing so brought up a Customize window, which put ArcMap into design-mode, and listed every command/toolbar available within software (Figure 1). As I've witnessed in previous projects, the list of categories and commands was somewhat overwhelming. In the past, I've always focused on adding and removing toolbars; with the exception of the Buffer Wizard, I've never actually added or removed individual tools before. Luckily, the "Show commands containing" box (see Figure 1) allows the user to search for individual tools; even so, at times I found somewhat challenging to find the tools I needed. It was also important to save the customization within the lesson.mxd file, in lieu of the default template (normal.mxt) so future map projects wouldn't have the limited interface as a default. Finally, the customized document was password protected to keep anybody from accidentally making changes to the interface.
Figure 1. The customization window in ArcMap.
Figure 2. The simplified interface of ArcMap setup for an introductory GIS workstation. Please click on image for a full size graphic.
Application
The second goal was to gain a basic introduction to ArcObjects and the Visual Basic Editor. This was accomplished primarily by writing a small piece of code (Figure 3) to welcome a user to the simplified GIS workstation. This code simply prompted the user to enter his or her name (Figure 4) and then responded with a personalized welcome message (Figure 5). Writing this small piece of code was my first experience with programming. In this case, it was event-driven programming; this type of programming is based upon a graphical user interface and relies on an operator to click on an menu item or button, which in turn causes an action to be performed (Enderlein 2008b). Each action is essentially linked to a small piece of code, which then automates a procedure which can vary from very simple (in the case of this lesson) to much more complicated.
A key requirement of this type of programming, as well as any type of programming is the use of variables. A variable is essentially a symbol, whether it be text or numerical, that represents something else. According to Enderlein (2008), variables can be "used to store input from the user, to store values returned from another program, to represent constant values (like the path to your GIS data on your computer)." For this lesson, an example of a variable would be strUserName. This variable stores the results of what the user entered in the first message box (see Figure 4) and then displays them within the personalized message (see Figure 5).
Figure 3. Visual Basic Editor screenshot depicting the example code. Please click on image for a full size graphic.
Figure 4. First part of the welcome message box programmed in Figure 2. Please click on image for a full size graphic.
Figure 5. Second part of the welcome message programmed in Figure 2. Please click on image for a full size graphic.
Conclusion
This lesson provided the basics for customization of the ArcMap interface. By manually picking and choosing tools, it reinforced the complexity and the wide range of available tools provided in ArcView. It also provided a good segue into programming. Presumably, virtually all of the tools available in design mode can be triggered with an event programmed in the visual basic editor. The lesson also reinforced the differences in variables between mathematics and programming; while in math, a variable represents a number (i.e., X = 4), in programming a variable can represent a whole slew of things (see Application section).
References
Enderlein, Timothy
2008a Basics of ArcGIS Customization, Lesson 1. The Pennsylvania State University World Campus Certificate Program in GIS. Accessed 15 January 2008.
2008b Basics of ArcGIS Customization, Lesson 1 Concept Gallery. The Pennsylvania State University World Campus Certificate Program in GIS. Accessed 15 January 2008.
This document is published in fulfillment of an assignment by a student enrolled in an educational offering of The Pennsylvania State University. The student, named above, retains all rights to the document and responsibility for its accuracy and originality.