- Geography 5224 -
Project 2: Intro to Programming ArcObjects (Week 1)

Objective:
work with the ArcObjects object model diagrams and the Developer Help;
write simple practice programs; customize the ArcMap interface to include a new Zoom menu

Below is the Visual Basic code for programming a Zoom procedure:

Private Sub ZoomOut125_Click()
Dim pMxDoc As IMxDocument
Set pMxDoc = ThisDocument

Dim pActiveView As IActiveView
Set pActiveView = pMxDoc.ActiveView

Dim pEnv As IEnvelope
Set pEnv = pActiveView.Extent

pEnv.Expand 1.25, 1.25, True
pActiveView.Extent = pEnv
pActiveView.Refresh

End Sub


Above is a screen capture showing a customized ArcMap user interface with defined zoom settings.


back to gis coursework