3.59 DM_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 DM_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 options needs to be set to DMF_SaveAll.

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

DM_Boolean DML_default DM_EXPORT DM_SaveProfile
(
  DM_String  filename,
  DM_ID      dialog,
  DM_String  comment,
  DM_Options options
)

Parameters

-> DM_String filename

This parameter defines the file name of the configuration file. A file path can be specified which may also contain an environment variable.

-> DM_ID dialog

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

-> DM_String comment

In this parameter a text can be specified, which is written as a comment into the configuration file.

-> DM_Options options

These are the options available:

Option

Meaning

DMF_SaveAll

Writes the inherited values into the configuration file too.

Return value

DM_TRUE

Saving the values in the configuration file has been successful.

DM_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

C function DM_LoadProfile

Built-in function saveprofile()