ArcObjects Library Reference  (ArcMapUI)    

MxDocument CoClass

ESRI Mx Document.

Product Availability

Available with ArcGIS Desktop.

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.

To edit the contents of a map document saved to a file (*.mxd) outside of an ArcMap session or without instantiating a new Application (ArcMap process), see IMapDocument.  IMapDocument provides the ability to edit and save the contents of a map document.

Supported Platforms

Windows

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.
IDataGraphCollection (esriCartoUI) Provides access to members that control graph collection in map document.
IDataGraphs (esriCartoUI) Provides access to members that control the datagraph collection.
IDocument (esriFramework) 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 (esriFramework) Provides access to the dirty flag of the Document.
IDocumentDirty2 (esriFramework) Provides access to the dirty flag of the Document.
IDocumentInfo Provides access to members that control the Document Info.
IDocumentVersion (esriSystem) Provides access to members that control the document version.
IMxDocument Provides access to members that control the Mx Document.
IPersist Defines the single method GetClassID, which is designed to supply the CLSID of an object that can be stored persistently in the system. IPersist is the base interface for three other interfaces: IPersistStorage, IPersistStream, and IPersistFile.
IPropertySupport (esriSystem) 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.
IDataGraphCollectionEvents Provides access to events that occur when the collection of graphs in the document changes.

Working with Events

[Visual Basic 6.0]

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

When implementing IDataGraphCollectionEvents declare variables as follows:

Private WithEvents pMeasuredGridFactory as MeasuredGridFactory

 


Feedback Send feedback on this page