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


IMapDocument.IsMapDocument Property (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Carto > ESRI.ArcGIS.Carto > Interfaces > IM > IMapDocument Interface > IMapDocument.IsMapDocument Property
ArcGIS Developer Help

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