Maptitude GISDK Help |
You can use GISDK functions to save the contents of a window to a file, or to reopen a file, recreate the window, and set the window options. Other functions tell you whether there have been any changes to a map, editor, figure, or layout, or whether or not the window has been previously saved to a file. Here is a summary of these functions:
Map Function |
What it does |
Gets the name of the file in which a map was last saved |
|
Determines whether a map has changed since it was last saved to a file |
|
Gets the title of a map |
|
Opens a map file and displays it in a map window |
|
Creates a new map window from a map that appears in a layout |
|
Saves a legend in a separate window to an image file |
|
Saves settings for a map window to a file on disk |
|
Saves the contents of the map window to an image file |
|
Saves map graphics to a Windows Enhanced metafile |
|
Sets the filename for a map |
|
Sets the flag that indicates whether a map has changed since it was last saved to a file |
|
Sets the title of a map |
Editor Function |
What it does |
Gets the name of the file in which an editor window was last saved |
|
Determines whether an editor has changed since it was last saved to a file |
|
Creates an editor from a file |
|
Creates a new editor window from an editor that appears in a layout |
|
Saves an editor to a file |
|
Saves the contents of the editor window to an image file |
Figure Function |
What it does |
Gets the name of the file in which a figure was last saved |
|
Determines whether a figure has changed since it was last saved to a file |
|
Gets the type of a figure window. |
|
Creates a figure from a file |
|
Creates a new figure window from a figure that appears in a layout |
|
Saves a figure to a file |
|
Saves the contents of the figure window to an image file |
|
Saves figure graphics to a Windows Enhanced metafile |
Layout Function |
What it does |
Gets the name of the file in which a layout was last saved |
|
Determines whether a layout has changed since it was last saved to a file |
|
Creates a layout from a file |
|
Saves a layout to a file |
|
Saves the contents of the layout window to an image file |
|
Saves layout graphics to a Windows Enhanced metafile |
Workspace Function |
What it does |
Restores a workspace from its file |
|
Saves the current workspace to a file |
Here is a sample macro that runs when a map window is closed. It checks to see if the map has changed, then saves it automatically.
Macro "close macro for a map"
// Has the map changed in any way?
if GetMapSaveFlag() then do
// Get the name of the map file, if there is one
fnm = GetMapFile()
// Save the map under its existing name...
if fnm <> null then
SaveMap(, fnm)
// Or, ask the user for a new name and save the file under that name
else do
// If the user cancels, don't try to save and don't close...
on escape do Return(1) end
fnm = ChooseFileName({{"Map File", "*.map"}}, "Save Map As", )
// Save under the new name
SaveMap(, fnm)
end
end
// Finally, allow the map window to close
Return(null)
EndMacro
The following functions have been superceded by the SaveMapToImage(), SaveEditorToImage(), SaveFigureToImage(), and SaveLayoutToImage() functions, but are still available for backward compatibility:
Function |
What it does |
Saves the editor image as a Windows bitmap file |
|
Save the editor image as a JPEG compressed file |
|
Saves the figure image as a Windows bitmap file |
|
Save the figure image as a JPEG compressed file |
|
Saves the layout image as a Windows bitmap file |
|
Save the layout image as a JPEG compressed file |
|
Saves the map image as a Windows bitmap file |
|
Save the map image as a JPEG compressed file |
In addition, SaveLayoutToPNG() was deleted; use SaveLayoutToImage() instead.
©2025 Caliper Corporation | www.caliper.com |