SaveMapAs method

Saves the specified map or template.

Applies to

Objects:  MappointControl

Syntax

object.SaveMapAs(FileName)

Parameters

Part Description
object Required. An expression that returns a MappointControl object.
FileName Required String. Name of the file to save. You can include the full or relative path.

Remarks

If a file of the same name and format already exists, that file is overwritten. To avoid overwriting a file, check for the existence of a file before saving.

If a path name is not specified, the map or template is saved in the "My Documents" directory.

Example

  [Microsoft Visual Basic 6.0]
'Assume the MappointControl on your form is named "MappointControl1" Private Sub cmdSaveAs_Click() MappointControl1.SaveMapAs App.Path & "\NewMap.ptm" End Sub
[C#]
//Assume the MappointControl on your form is named "MappointControl1" private void saveMapAs_Click(object sender, System.EventArgs e) { //Save the map into the default folder MappointControl1.SaveMapAs("NewMap.ptm"); }