ArcObjects Component Help  (Core)    

MxDocument CoClass

ESRI Mx Document.

Description

The map document (MxDocument) is the ArcMap running application.  The overall role of the map document is to control the representation of data .  This object implements several interfaces including IMxApplication and IDocument.  IMxDocument is a starting point for accessing most of the other ArcMap objects including the collection of maps, the page layout, and the style gallery.  The IDocument interface provides access to the document's title, type, accelerator table, CommandBars collection, and VBA project.

There is one map document per session of ArcMap.  Instantiating a new MxDocument starts a new ArcMap application.  Actually, creating a new MxDocument really creates a new Application object which in turn co-creates a new MxDocument.

Interfaces

Interfaces Description
IChangeLayout Provides access to members that control changing the document's layout.
IContentsViewEdit Provides access to members that control Contents View Edit.
IDataGraphs Provides access to members that control the datagraph collection.
IDocument Provides access to other objects in the document.
IDocumentDatasets Provides access to members that control the Dataset Container.
IDocumentDefaultSymbols Provides access to members that control Default Symbols for the document.
IDocumentDirty Provides access to the dirty flag of the Document.
IDocumentDirty2 Provides access to the dirty flag of the Document.
IDocumentInfo Provides access to members that control the Document Info.
IMxDocument Provides access to members that control the Mx Document.
IPersist
IPropertySupport Provides access to members that set a default property on an object.
IReportUnitFormat Provides access to report unit formatting.

Event Interfaces

Interfaces Description
IDocumentEventsDisp (default) Provides access to events that occur in ArcMap.
IDocumentEvents Provides access to events that occur in ArcMap.

Working with Events

[VB6]

When working with MxDocument's default outbound interface in Visual Basic 6 declare variables as follows:

Private WithEvents pMxDocument as MxDocument

When implementing IDocumentEvents declare variables as follows:

Private WithEvents pDocumentEvents as DocumentEvents