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


IMapDocument.SaveAs Method (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (Carto)  

IMapDocument.SaveAs Method

Save the contents of the map document to the specified file name.

[Visual Basic .NET]
Public Sub SaveAs ( _
    ByVal sDocument As String, _
    [ByVal bUseRelativePaths As Boolean], _
    [ByVal bCreateThumnbail As Boolean] _
)
[C#]
public void SaveAs (
    string sDocument,
    bool bUseRelativePaths,
    bool bCreateThumnbail
);
[C#]

Optional Values

bUseRelativePaths   Supply true as a default value.
bCreateThumnbail   Supply true as a default value.
[C++]
HRESULT SaveAs(
  BSTR sDocument,
  VARIANT_BOOL bUseRelativePaths,
  VARIANT_BOOL bCreateThumnbail
);
[C++]

Parameters sDocument [in] sDocument is a parameter of type BSTR bUseRelativePaths [in, optional, defaultvalue(VARIANT_TRUE)] bUseRelativePaths is a parameter of type VARIANT_BOOL bCreateThumnbail [in, optional, defaultvalue(VARIANT_TRUE)] bCreateThumnbail is a parameter of type VARIANT_BOOL

Product Availability

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

Description

Saves the MapDocument that is Open and any changes that have been made to it to a new MapDocument with the specified filename. The filename that is supplied must be valid and inlcude the *.mxd extension. By default MapDocuments are saved without relative paths and thumbnails.

Specifying thumbnails as True can delay saving complex map documents as the view of the document is generated for the thumbnail. However, thumbnails are guides for users browsing map documents using ArcCatalog and Windows Explorer.

Remarks

The SaveAs method cannot be used to save the MapDocument as an earlier ArcGIS 8.3 map document.

See Also

IMapDocument Interface