Sunday, June 1, 2008

ArcObject Defintion


Are You new in ArcObject or You are hearing first time this world, then read this it will help you a lot about understanding Arcobject.


ArcObjects is the collection of COM components that provides
the underpinning for two new ArcInfo 8 applications—ArcMap and
ArcCatalog. This set of components includes more than 1,200 objects
that may be used to customize, extend, or construct GIS applications.
Initially, an object model of this size can seem a little overwhelming.
Taking a close look at the object model for ArcMap will familiarize you
with some of the fundamental components in the larger object model.

The Basic Structure
Figure 1 shows a conceptual object model for ArcMap. The top-level
object, MxApplication, represents ArcMap itself. MxApplication manages
a single document, MxDocument. ArcMap uses a Single Document
Interface (SDI) in contrast to ArcView GIS, which uses a Multiple
Document Interface (MDI). MxDocument manages a collection of Map
objects and a PageLayout object. When ArcMap is in geographic view,
the ActiveView is a Map. When it’s in layout view, the ActiveView is
the PageLayout. Regardless of the type of view, there is always a single
FocusMap.
If ArcMap displays a document with three data frames in layout view,
there will be three Maps attached to the MxDocument, the ActiveView
property will return the PageLayout, and the FocusMap will return the
Map corresponding to the data frame that is highlighted. The VBA
script listed in Figure 2 illustrates this part of the object model. The
script changes the ActiveView’s extent and zooms in by 75 percent.
This script is fairly straightforward. The real work is getting the current
extent, which is an IEnvelope interface, from the ActiveView, shrinking
it, and making the modifi ed envelope the new extent. This script operates
on the ActiveView through the IActiveView interface. The ActiveView
can be either the PageLayout or a Map depending on what the end user is
looking at. This script will function correctly in either case.

Working with Interfaces
In some cases you will want to work specifi cally with either the Map or
the PageLayout through a different interface. In this situation, a COMobject
model differs greatly from a traditional object-oriented model
like Avenue or MapObjects. An interface is a collection of related methods
and properties. COM objects expose multiple interfaces. For example,
the Map exposes not only the IActiveView interface but the IMap
interface and several others

No comments: