SetMapSaveFlag()

Summary

Sets the flag that indicates whether a map has changed since it was last saved to a file.

Syntax

SetMapSaveFlag(string map_name, boolean new_flag_value)

Argument Contents
map_name The name of the map, or null for the current map
new_flag_value If "True" indicates that the map needs to be saved. If "False" indicates that the map does not need to be saved.

Notes

  • The save flag is set automatically whenever the map is changed, but the user is not prompted automatically when the map is closed. Use GetMapSaveFlag() to determine whether or not to prompt the user about saving the map.

  • Use SetMapSaveFlag() to mark the map as not needing saving, even if it has changed, or as needing saving, even if it has not changed.

Example

// Even though we added a layer, after opening the map,
// we also removed it, so the map doesn't need saving
SetMapSaveFlag(, "False")

Error Codes

Error Type Meaning
NotFound The specified map does not exist

See Also

Function Summary
GetMapSaveFlag() Determines whether a map has changed since it was last saved to a file
GetEditorSaveFlag() Determines whether an editor has changed since it was last saved to a file
GetLayoutSaveFlag() Determines whether a layout has changed since it was last saved to a file
OpenMap() Opens a map file and display it in a map window
SaveMap() Saves settings for a map window to a file on disk
CloseMap() Closes a map window