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


IMapDocument.IsMapDocument Property (ArcObjects .NET 10.6 SDK)
ArcObjects Library Reference (Carto)  

IMapDocument.IsMapDocument Property

Indicates if the map document is a valid map document.

[Visual Basic .NET]
Public Function get_IsMapDocument ( _
    ByVal sDocument As String _
) As Boolean
[C#]
public bool get_IsMapDocument (
    string sDocument
);
[C++]
HRESULT get_IsMapDocument(
  BSTR sDocument,
  Boolean* IsMapDocument
);
[C++]

Parameters sDocument [in]
sDocument is a parameter of type BSTR IsMapDocument [out, retval]
IsMapDocument is a parameter of type bool*

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

Determines whether the specified file exists and whether the files internal storage is an ArcMap document (*.mxd), ArcMap template (*.mxt), Published Map File (*.pmf) or Layer File (*.lyr). Always check that a file is a MapDocument before using the Open method.

See Also

IMapDocument Interface