ArcObjects Library Reference (Framework)  

IDocument Interface

Provides access to other objects in the document.

Product Availability

Available with ArcGIS Desktop.

When To Use

Use the IDocument interface to get access to the document's title, type, accelerator table, commandbars collection, parent application, and Visual Basic project. Use IApplication::Document to get a reference to the document.

Members

Description
Read-only property Accelerators The accelerator table for this document.
Read-only property CommandBars The commandbars collection in this document.
Read-only property ID The unique id for this document.
Read-only property Parent The application in which this document is open.
Read-only property Title The title of this document.
Read-only property Type The type of this document.
Read-only property VBProject The VBProject for this document.

CoClasses that implement IDocument

CoClasses and Classes Description
GMxDocument (esriArcGlobe) Provides access to members that control the ArcGlobe document.
GxDocument (esriArcCatalog) ESRI ArcCatalog Application Document.
MxDocument (esriArcMapUI) ESRI Mx Document.
SxDocument (esriArcScene) Provides access to members that control the ArcScene document.

Remarks

The document object is called MxDocument in ArcMap and GxDocument in ArcCatalog.

See Also

IApplication.Document Property

.NET Snippets

Add Event Wiring for New and Open Documents | List ArcMap Visible Toolbars |

.NET Samples

Automate ArcGIS Desktop applications (Code Files: Form1) | Custom feedback tool and font drop-down list tool control (Code Files: FontToolControl) | Extension implementation (Code Files: SimpleExtension) | Extension to listen to document open and save events (Code Files: LogExtension) | Layer filtering TOC view (Code Files: TOCLayerFilter) | Schematic diagram auto refresh (Code Files: FormAutorefresh) | Simple logging dockable window with a custom context menu (Code Files: ClearLoggingCommand LoggingDockableWindow LogLineMultiItemCmd) | Subset network evaluators (Code Files: AutoUpdateNetworkElementArrayParametersCommand) |

.NET Related Topics

3DAnalyst | Accessing application and document objects | ArcMapUI | Automating the ArcGIS Desktop applications | Create a command by inheriting from BaseCommand | GlobeCore | How to create AOIs and bookmarks | How to listen to document events | How to show a context menu in ArcGIS Desktop applications | LocationUI | Performing basic map functions | Version |