GEOG 490/590

GIS Programming

Exercise 1: Verify odin account setting, finish pre-course survey, access course readings, and install your first ArcGIS add-in

 

No one can master a computer programming language without practice. In addition to lab assignments, the class has many exercises to help you practice GIS programming. An exercise is a list of activities that helps you understand and experience the topics covered in the lectures. You don't have to turn in anything for the exercises you finish. However, it's extremely important for you to complete the exercises so that you can acquire the skills to complete your lab assignments and the term project.

 

This exercise helps you to get ready for this class and for developing GIS programs in ArcGIS. There are four simple tasks to complete.

 

1.       You need to make sure that you have a valid odin account to use Geography lab computers and other computers in PSU's public computer labs. Please logon to a lab computer with your odin account. Raise your hand to report any problem to the instructor.

 

2.       Once you have logon to the lab computer, go to the course webpage (http://web.pdx.edu/~jduh/courses/geog490w11/) and follow the pre-course survey link to complete the survey.

 

3.       All the required readings are either accessed from the online help of the software (VB 2008 or ArcGIS) or from the internet. You must learn to use these publicly available references to sharpen your programming skills in and beyond this class. Developing a computer program is a problem-solving process. You have to be resourceful to develop a computer program effectively and efficiently (same with solving a problem). Use the following steps to learn how to access the VB Online Help readings for class meetings. Make sure the computer you use has internet connection to access web contents.

a.       Start Microsoft Visual Basin 2008 Express Edition from the Windows Program menu.

b.      Select Search from the Help menu (or press F1 and click on the Search tab on the Microsoft Document Explorer window).

c.       Make sure the search filter on the left panel is set to "Visual Basic Express Edition" and type one of the reading topics listed on the syllabus in the Search field on the Search tab in the upper right-hand panel. Make sure you put the double quotes around the topic, for example "Introduction to the Visual Basic Express IDE," and press the Search button (or press the Enter key).

d.      The search results appear on the lower right-hand panel. You notice that there are 9 entries from MSDN Online, 0 from Codezone Community, Questions, and Local Help. (The results might be different depending on how the software was installed.)

e.      Click on the first entry (i.e., "Introduction to the Visual Basic Express IDE") of the MSDN Online result list. You should see a page with 5 hyperlinks under the "in this section" heading. According to the syllabus, you should read all the hyperlinked pages before the next class meeting.

f.      MSDN searches may return seemingly identical results for some search phrases. These results are for different versions of Visual Basic. Visual Basic 2008 is also known as Visual Basic 9.0 by those in MS' inner circle. You may be able to validate the version of the reading by looking at the url: http://msdn.microsoft.com/en-us/library/bxak45ef(VS.90).aspx. VS.90 indicates that this is a Visual Basic 2008 article.

g.        Now search for "Using project templates to extend ArcObjects." Please note that this topic belongs to ArcObjects Help for .NET. This time the search result has 0 for MSDN Online, but has many entries from the Local Help.

h.       Click on the Local Help. You should see "Using project templates to extend ArcObjects" on the top of the list. Click on the first entry to open the document. Many matching keywords are highlighted in the document. Right-click on the page and select "Refresh" to remove the highlights.

i.      Now, make sure you find all the readings for the next class session. Raise your hand to report any problem to the instructor.

4.       The required readings may also be available online. MSDN readings are posted at http://msdn.microsoft.com/en-us/library/2x7h1hfk(v=VS.90).aspx . ArcObjects readings are posted in the ArcGIS Resource Center at http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/ArcObjects_Help_for_NET_developers/0001000002zs000000/. Search for the reading topic as you would if you were using the software help (step 3). Be careful when searching MSDN that you are looking at an article for Visual Basic 2008.


5.       As you have learned in today's lecture, there are several programming approaches available in ArcGIS. We will use the ArcGIS add-in approach to develop GIS programs this term. You can see how to use add-ins in ArcGIS in this exercise. Please follow these steps to complete the exercise.

a.       Start ArcMap. Select "Add-in Manager" from the "Customize" menu.

b.      Make a note on the add-ins that are already "installed" on ArcMap. Click Close to close the Add-in Manager.

c.       Download this zip file to your personal workspace (e.g., C:\Students\Your_Odin), unzip it, and follow the instructions on the pdf (Delete Fabric Parcels and Plans AddIn.pdf) to complete the exercise. Please note that the data were packaged into a map package file (mpk) in the SampleData folder. To unpack a map package, drag the .mpk file (from Catalog) into ArcMap or right-click on the .mpk file and click Unpack. Alternatively, you can use the Extract Package tool and specify an output folder.

d.      When done, open the Add-in Manager. You can use the delete Add-in function on the Add-in Manager to remove the add-in after you complete the exercise.

e.      The add-in was developed using Microsoft C# (C Sharp), a programming language in the same Visual Studio suite as VB. You can find the source code in the SourceCode folder.

FYI

To complete the labs, exercises, and the term project of this class, you need the following software packages:

        ArcGIS Version 10 with Service Pack 1 (ask the instructor for the free student version)

        Microsoft Visual Studio (or Visual Basic) 2008 Express Edition (can be downloaded from Microsoft website for free). Please note that ArcGIS 10 does not support the latest Visual Studio 2010 Express Edition.

        ArcGIS 10 SDK for .NET Framework (available on the student version DVD). You need to install VB 2008 Express first before you can install this software.