ArcObjects Library Reference (Framework)  

IApplication.Document Property

The document that is currently loaded in the application.

[Visual Basic .NET]
Public ReadOnly Property Document As IDocument
[C#]
public IDocument Document {get;}

Product Availability

Available with ArcGIS Desktop.

Remarks

In ArcMap, the Document is the currently loaded document.
In ArcCatalog, the Document is the Normal template.

Both ArcMap and ArcCatalog applications are composed of several things including a document. The document is an object which controls the representation of data. In ArcMap, the document object is the MxDocument CoClass and in ArcCatalog it is the GxDocument CoClass. Access to these CoClasses is provided through this property.

See Also

IApplication Interface | IDocument Interface | MxDocument Class | GxDocument for use with ArcCatalog Class

.NET Snippets

Get MxApplication from ArcMap | Get Command on Toolbar by Names | Get Map from ArcMap | Assign Shortcut Key to Command | Get PageLayout from ArcMap | Find Command and Execute | Statements - Use a Tool in a Windows Form | Get Toolbar by Name | Get ActiveView from ArcMap | Get Globe from Application | Open StyleManagerDialog | Create Context Menu | Get Contents View from ArcMap | Get MxDocument from ArcMap | Use Custom Tool on Windows Form | Set Tool Active in ToolBar | TimeControl Playback | Get Command by Name | List ArcMap Visible Toolbars | Open StyleReferencesDialog |

.NET Samples

Applying user interface customizations at startup (Code Files: AcmeExt) | Automate ArcGIS Desktop applications (Code Files: Form1) | Create a command by inheriting from BaseCommand (Code Files: ZoomToLayer) | Create a custom selection extension by extending ArcObjects (Code Files: SelectionExtension ZoomToLayerMultiItem) | Create a custom tool (Code Files: DrawGraphicLine) | 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) | Implementing a schematic digitizing tool (Code Files: DigitTool) | Layer filtering TOC view (Code Files: TOCLayerFilter) | Migrating from VB6 to VB .NET for ArcGIS 10 (Code Files: clscopy_table_sel) | Network Analyst barrier location editor (Code Files: EditorForm) | Schematic diagram auto refresh (Code Files: FormAutorefresh) | Selection restriction evaluator (Code Files: SelectionRestrictionEvaluator) | Simple logging dockable window with a custom context menu (Code Files: LoggingDockableWindow) | StreetMap routing (Code Files: RoutingForm) |

.NET Related Topics

ArcMapUI | Create a command by inheriting from BaseCommand | Create a custom tool | How to create AOIs and bookmarks | How to listen to document events | How to use symbol level drawing | How to wire custom events using IActiveViewEvents | Migrating VB6 to VB.NET for ArcGIS 10 | Performing basic map functions | Publisher |