SaveEditor()

Summary

Saves an editor to a file.

Syntax

SaveEditor(string editor_name, string filename [, array options])

Argument Contents
editor_name The name of the editor
filename The path of the file in which the editor contents are saved
Option Type Contents
Header Data Any A value to store in the file header, including an array

Notes

  • The options array is an optional argument.

  • SaveEditor() does not save the data displayed in the editor. Only the editor settings and the references to the data are saved.

  • If the filename is null, SaveEditor() saves the editor in the last file in which the editor was saved.

  • While the editor file can have any file name and extension, Maptitude editor files normally have an extension of .DVW.

Example

SaveEditor("Sales Profile", "d:\\sales\\prof95.dvw")
// HeaderData variable defined previously
SaveEditor( , "d:\\sales\\profile.dvw", {{"Header Data", HeaderData}})

Error Codes

Error Type Meaning
Error The editor cannot be saved in the specified file (e.g., the disk is write-protected or out of space); or filename is null and the editor has never been saved
NotFound The specified editor does not exist

See Also

Function Summary
CreateEditor() Creates a new editor window
OpenEditor() Creates an editor from a file
CloseEditor() Closes an editor window