Transcript Slide 1

9. Introduction to ArcObjects
Most GIS analysis carried out within a GIS consists of a laborintensive sequence of steps.
Automating a GIS makes it possible to do much more
comprehensive modeling than manually going through these
steps.
It becomes possible to construct a dynamic model, then generate
and evaluate a range of possible scenarios in a way that is very
difficult when using the GIS interactively.
ArcObjects allows you to automate most processes within ArcGIS in
a flexible way, greatly expanding the available kinds of analyses.
Introduction to ArcObjects
The ESRI product nomenclature can be somewhat confusing. As background, here is is a list:

ArcGIS Desktop – the collection of ESRI desktop applications.

ArcView — Provides comprehensive mapping and analysis tools along with simple editing and
geoprocessing.

ArcEditor — Includes advanced editing capabilities for shapefiles and geodatabases in addition to the full
functionality of ArcView.

ArcInfo — Builds on the functionality of ArcEditor with advanced geoprocessing. It also includes the
legacy applications for ArcInfo Workstation.

ArcMap — ArcMap is the central application in ArcGIS Desktop. It is the GIS application used for all mapbased tasks, including cartography, map analysis, and editing.

ArcCatalog — The ArcCatalog application helps you organize and manage all of your GIS information
(maps, globes, datasets, models, metadata, services, and so on).

ArcObjects — ArcObjects provides an infrastructure for application development and customization, and
is most of what we will be dealing with with programming usiing ESRI’s tools.

Spatial Analyist, Network Analyst, 3DAnalyst, and other toolbox extensions can also be accessed from
within ArcObjects.
Introduction to ArcObjects
ArcObjects is a set of classes and objects designed for automating ArcGIS Desktop
applications.
It is a set of building blocks, and is also used by ArcMap and ArcCatalog.
It is part of a set of code libraries published by ESRI.
It works with C#, VB, and other Windows-based languages/environments.
Basic information about the ArcObjects Library is available at:
http://edndoc.esri.com/arcobjects/9.2/welcome.htm, under “ArcObjects Library
Reference”.
For additional help and reference material, go to http://edn.esri.com/.
Introduction to ArcObjects
ArcGIS Engine – Makes it possible to embed
ArcObjects into other Windows applications or
“Developer Components.”
ArcGIS Server – Offers similar services,
but is run by remote clients, such as web
browsers. Built to run in a non-visual
server environment.
Introduction to ArcObjects
ArcGIS Desktop – For applications that control
ArcGIS, or extensions to be included within ArcGIS
such as marcros or toolbox extensions. Allows full
interaction with ArcGIS user interface. ArcGIS
Desktop is what we will be using in class.
Other ESRI development tools include
Java interfaces for ArcGIS Engine and
ArcGIS Server (not desktop); ArcWeb
services, which let applications use
services provided by ESRI remotely;
ArcSDE for database integration; and
ArcIMS for web-server-based
applications. More information...
Introduction to ArcObjects
ArcObjects was built in C++ using a technology called COM, or Component
Object Model. COM is a predecessor to .NET, and is focused on allowing
applications to embed components or other applications.
One of the key features of .NET is Managed Code, that is, code that is
garbage-collected by the .NET runtime environment, and that interacts with
the system only through .NET interfaces. Unmanaged code interacts with the
system directly.
ArcObjects are built on Unmanaged code; there is a layer within the .NET
libraries that manage communication between these two environments.
That means that there is some extra overhead to each call from C# into the
ArcObjects library.
More information...
Introduction to ArcObjects
Introduction to ArcObjects
Within ArcObjects Desktop development environment, the main kinds
of software you can develop are:
Custom simple commands that can be run from within ArcGIS.
More complex toolbox plugins with their own user interfaces that
can also be run from within ArcGIS.
Applications that launch and control ArcGIS , accessing ArcGIS
functionality from an external process.
Embedding ArcGIS functionality within a separate stand-alone
application requires ArcEngine.
Introduction to ArcObjects
Simple custom
tool example:
Introduction to ArcObjects
More complex
ArcMap
Extension:
ArcObjects Library
The most direct way to use ArcObjects from within C# is to control
ArcGIS from an external application, which runs ArcGIS and controls
it using the ArcObjects interfaces.
This is the approach we will use in class.
To get an initial idea of the ArcObjects environment and
documentation, we can look at the now-familiar Geometry classes.
The next slide first displays the ESRI diagramming conventions.
ArcObjects Library
The ArcObjects library is quite large, with hundreds of classes documented by
pages and pages of class diagrams.
Geometry objects are found within a more complicated context than Geotools.
You have to go through a few layers to get to the actual geometry of a map.
The main organizing objects are:
• Application – A representation of the running application
• Document – A map document
• Map – A map within a document
• Layer – A layer within a map
ArcObjects
Application
ArcObjects
Document
ArcObjects
Layer
ArcObjects
Map
ArcObjects
The overall sequence of automating ArcMap from an external
application is:
1.
2.
3.
4.
5.
6.
7.
Launch ArcMap
Open map document file
Get a reference to the map within the document
Retrieve the layers from the map
…. Read/write from the map layer ….
Close/save the document
Quit ArcMap
ArcObjects allows you to automate most processes within ArcMap.