11.40 saveprofile()

This function writes the current values of all configurable record instances (.configurable = true) and global variables (declared with config) of a dialog or module into a configuration file (profile), from which they can be reloaded using the function loadprofile().

For records, only values that are not inherited are written into the file by default. In order to also write the inherited values into the file, the parameter All needs to be set to true.

Only values from the indicated dialog or module are saved. Records and variables imported from other modules are omitted.

Definition

boolean saveprofile
(
      string  Filename   input
  { , object  Module  := null input }
  { , string  Comment := ""   input }
  { , boolean All :=  false   input }
)

Parameters

string Filename input
This parameter defines the file name of the configuration file. A file path can be specified which may also contain an environment variable.
object Module := null input

This optional parameter contains the identifier of the dialog or module whose record and variable values are to be written into the file.

With Module = null, the module ID of the current rule is used.

string Comment := "" input
In this optional parameter a text can be specified, which is written as a comment into the configuration file.
boolean All := false input
If this optional parameter is set to true, the inherited values are also written to the configuration file. With the default value false, only are saved that are not inherited.

Return value

true
Saving the values in the configuration file has been successful.
false

The values could not be saved.

This may be due to errors accessing the file or an invalid module ID.

Availability

Since IDM version A.06.02.g

See also

Built-in function loadprofile()

C function DM_SaveProfile