This document is archived and information here might be outdated.  Recommended version.


IMxDocument Interface (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > ArcMapUI > ESRI.ArcGIS.ArcMapUI > Interfaces > IM > IMxDocument Interface
ArcGIS Developer Help

IMxDocument Interface

Provides access to members that control the Mx Document.

Product Availability

Available with ArcGIS Desktop.

Members

Name Description
Read-only property ActivatedView The activated view. This is the same as the active view unless a data frame is activated within a layout.
Read/write property ActiveView The active view.
Read-only property ActiveViewCommand The command associated with the active view.
Method AddLayer Adds a layer to the current focus map.
Method CanInsertObject Indicates if the document allows objects to be inserted.
Read-only property ContentsView The contents view at the specified index.
Read-only property ContentsViewCount The number of contents views in the document.
Read/write property ContextItem The last item that was right-clicked.
Read/write property CurrentContentsView The current contents view of the document.
Read/write property CurrentLocation The current mouse location in map units.
Read/write property DefaultColor The default color for the given type.
Read-only property DefaultTextFont The default font for text.
Write-only property DefaultTextFont The default font for text.
Read/write property DefaultTextFontSize The default font size for text.
Write-only property DelayUpdateContents Indicates document update notifications should be ignored.
Read-only property FocusMap The current focus map.
Method InsertObject Inserts an object into the document. Displays the insert object dialog.
Read-only property Maps The collection of maps in the document.
Read-only property OperationStack The operation stack.
Read/write property PageLayout The page layout.
Read/write property RelativePaths Indicates if path names are stored relative to the document.
Read-only property SearchTolerance The global search tolerance in geographic units for selection.
Read/write property SearchTolerancePixels The global search tolerance in pixels for selection.
Read-only property SelectedItem The selected item in the layer control.
Read-only property SelectedLayer The selected layer in the layer control.
Read-only property StyleGallery Reference to the document's Style Gallery.
Read-only property TableProperties Table properties, for Layers and Tables in ArcMap.
Method UpdateContents Notifies the document that the contents have been updated.

Classes that implement IMxDocument

Classes Description
MxDocument Esri Mx Document.

Remarks

This interface is a starting point for much of the other objects in ArcMap.  For example, this interface provides access to the current active view, the currently selected map, all of the maps, and the style gallery.  This interface also has many properties reflected in the running application including: the text font, the text size, and the search tolerance.  Almost every ArcMap customization uses IMxDocument one way or another.

Obtain a reference to this interface via IApplication::Document.

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.


   
 
         

.NET Samples

Generate a report Time Series Graph tool add-in Applying a time offset to a time-aware feature layer Brushing to create a selection Create a custom tool Custom UI elements using add-ins Make a custom time slider ArcGIS Network Analyst extension barrier location editor Publish a map Schematic diagram auto refresh Implementing a schematic digitizing tool Implementing an XML builder external component Custom selection extension Create a custom selection extension by extending ArcObjects Create a custom selection extension by extending ArcObjects Create a custom selection extension by extending ArcObjects Create a custom selection extension by extending ArcObjects Selection restriction evaluator Set the time extents for a layer then render the layer StreetMap routing Subset network evaluators Custom subtyped command and tool Layer filtering TOC view Custom feedback tool and font drop-down list tool control Custom feedback tool and font drop-down list tool control ViperPin tool