GEOG 490/590: GIS Programming
Lab1. Hello World
Due Jan 14 before class.
Introduction:
You will use an ESRI Virtual Campus course to learn ArcGIS Visual Basic for Applications (VBA) programming language.
You will do the exercise in ArcMap VBA environment.
Although many of the lab instructions do not ask you
to repeat (or experiment with) the tasks, it will help you understand the topic
if you do it and experiment with it. Also, don’t be shy from using MicroSoft Visual Basic Help that comes with ArcMap VBA. It’s a good starting point when you need
help with VB codes. EDN
has a huge collections on ArcObjects and VB(A) references. That’s the place you have to check
out.
Make sure you put your lab data in a folder in the
C:\Users folder and regularly back up your data to your H drive or portable
device.
Instructions:
In this lab, you will use your access code to take the first two modules of the “Learning Visual Basic for Applications for New ArcGIS Developers” course online. Please use the following instructions to access the course on ESRI Virtual Campus.
1.
Go to http://training.esri.com. Click "Go to My Training." Under
My Courses click "My Virtual Campus Courses." If you already have an
ESRI Global Account, log in using your username and password. If you do not,
click "Create New Account."
2.
Click "Start a new course". Type (or copy and paste) your
14-character Course Access Code in the field provided and click
"Go." Follow the instructions on your screen. See the table at the
end of the instruction for your Access Code.
3.
From your course list, click the course title “Learning
Visual Basic for Applications for New ArcGIS
Developers” to begin.
Lab Deliverables:
Zip
(i.e., compress) your map document file and indicate on the report where the
zipped file is located (e.g., ch469c01, C:\users\myfolder\lab1\lab1.zip). To
create a zipped file in Windows XP, go to your work folder and click the
right-mouse-button. Select New and then “Zipped (Compressed)
Folder” to create a zipped folder. You can just copy and paste the files
into the zipped folder.
1.
Your single mxd file
that contains the AP that has the following functions.
1)
A UserForm
containing the final DMS to DD function that you created.
2)
A second UserForm that has a ListBox and
two buttons: Add text and Clear. When the Add text button is clicked, an InputBox pops up and let users enter some texts and then
add the texts to the ListBox. When users click the
Clear button, all the texts in the ListBox disappear.
3)
Each line of your code
in the first and second UserForms must have a comment
describing what the code is about.
1)
A third UserForm containing the complete Retirement Fund Calculator
2)
An ArcMap
toolbar containing 3 UIButtonControls that, when
clicked individually, open up the corresponding forms.
2.
A hardcopy of the
answers to the following questions:
1)
You used MsgBox function to display messages. In one of the example,
the text uses a constant called “vbYesNo.”
What value does the constant represent? What are the possible return values
when you used the vbYesNo button setting in the MsgBox function? Please use the ArcMap
VBA online help or write a small program to find the answer.
2)
Describe the effect
and purpose of “Option Explicit” statement.
Virtual Campus Access Codes:
No |
Student |
Access Code |
1 |
Elizabeth
Amrine |
VCVNXGKKXKNPWR |
2 |
Allen
Byrd |
VCVLQGXAPCFXHW |
3 |
Kate
Clark |
VCCQXXYFWCLPDL |
4 |
Morgan Crowell |
VCKDHDFMJLXFNH |
5 |
Shayna
Denny |
VCMWKYRGUYEKNF |
6 |
|
VCLFLJPRRAYNAA |
7 |
Amber Gladieux |
VCWJLJGQJJQGDP |
8 |
Richa
Jain |
VCYTWMTAAPFXYN |
9 |
James
Manzione |
VCHJUNMVNVJJYK |
10 |
Mike
Martello |
VCLUVPRHTUERRN |
11 |
Autumn
Montegna |
VCUHTLBFTXLGGM |
12 |
Hector Osuna Mondragon |
VCKEEFDUMCKUFU |
13 |
Joseph
Rhodes |
VCYFQTEANBBNEG |
14 |
Wayne
Larimer |
VCMFNRJGANXVRX |
15 |
David
Silcock |
VCQDFXUNUHJPDR |
16 |
Sarah
Thompson |
VCHTGGBGPMQJGT |
17 |
|
VCWVEBENTDPUAW |
18 |
Bill
Wessinger |
VCWUKFNXBJCHMQ |
19 |
Sean
Wilson |
VCRCDMTKQJHPBX |
20 |
Heather
Zike |
VCBCGUYLJFNDVU |
21 |
Tim Sennott |
VCGGGCKRFJHQGT |
22 |
Alice Tarachow |
VCMUQEDMXNKPHD |
23 |
Jana LaFrenier |
VCKLLAWKDDMVRU |
24 |
|
|