ArcObjects Library Reference (Carto)  

IMapDocument.Save Method

Save the contents of the map document to the bound file.

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

Optional Values

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

Parameters

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. Before using the Save method check whether the document IsReadOnly. If a MapDocument is read only use the SaveAs method to create a new MapDocument. 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

If a Published Map File (*.pmf) or Layer File (*.lyr) is Open use the SaveAs method to create a new Map Document (*.mxd), as attempting to use the Save method will return an error.

See Also

IMapDocument Interface

.NET Samples

Implementing a property page for an ArcGIS Engine application (Code Files: frmMain) | Save a layer file in a MapControl application (Code Files: frmMain) | Schematics Engine application (Code Files: MainForm) | Simple dynamic display application (Code Files: MainForm) | Synchronized MapControl and PageLayoutControl application (Code Files: frmMain) | Temporal statistics (Code Files: MainForm) |

.NET Related Topics

How to create a mosaic layer |