SettingsManager

MacroModule
genre Fields
author MeVis Medical Solutions AG
package MeVisLab/Standard
definition SettingsManager.def
see also MakeName, FieldIterator
keywords load, save, network

Purpose

The module SettingsManager loads/saves field values from/to a file or a settings string.

Usage

Set up the list of fields (Store Fields) to be managed (you may use drag&drop), and use Save/Load to save to / load from a file, or use Update/Restore to just save to / load from the Settings String, if you want to care about persistency in a different way.

Details

Syntax in input text field:

Field1,
Field2,
...

Syntax in saved files:

Field1 = value1;
Field2 = value2;
...

The module offers a field separatorChar to set the separator character for the settings string.

Windows

Default Panel

../../../Modules/Macros/Helpers/mhelp/Images/Screenshots/SettingsManager._default.png

Parameter Fields

Field Index

Auto Load: Bool Restrict Load/Restore to specified fields: Bool
Auto Restore: Bool Save: Trigger
Filename: String separatorChar: String
Load: Trigger Settings String: String
Only Set If Changed: Bool settingsLoaded: Trigger
Postfix: String settingsNotFound: Trigger
Restore: Trigger Store Fields: String
restoreDetectedNonExistentFields: Bool Update: Trigger

Visible Fields

Store Fields

name: storedFields, type: String

Sets the list of fields to be stored.

Syntax is:

moduleName1.fieldName1,
moduleName1.fieldName2,
moduleName2.fieldName1

Restrict Load/Restore to specified fields

name: restrictLoad, type: Bool, default: FALSE

If checked, the loading/restoring is restricted to the specified fields. (This makes a difference if the settings string contains a different set of fields than the ones listed in Store Fields.)

Only Set If Changed

name: onlySetIfChanged, type: Bool, default: FALSE

If enabled, field values are only restored if the string value of the field is different from the stored value.

Load

name: load, type: Trigger

If pressed, the persistency file is loaded.

Save

name: save, type: Trigger

If pressed, the persistency file is saved.

Auto Load

name: autoLoad, type: Bool, default: TRUE

If checked, the module automatically loads the settings file.

Filename

name: filename, type: String

Sets the filename of the file to save to / to load from.

Postfix

name: postfix, type: String, deprecated name: appendName

Sets an additional filename extension.

Settings String

name: settingsString, type: String

Shows and sets the field value string.

Update

name: update, type: Trigger

If pressed, the value list in Settings String is updated.

Restore

name: restore, type: Trigger

If pressed, the value list in Settings String is restored into the original fields.

Auto Restore

name: autoRestore, type: Bool, default: FALSE

If checked, the value list is automatically restored (whenever the Settings String changes).

Hidden Fields

settingsLoaded

name: settingsLoaded, type: Trigger

settingsNotFound

name: settingsNotFound, type: Trigger

separatorChar

name: separatorChar, type: String, default: ;

Sets a separator character for splitting the settings string.

If the field is left empty, a semi-colon is assumed as a separator character, otherwise the first set character of this string is used.

restoreDetectedNonExistentFields

name: restoreDetectedNonExistentFields, type: Bool, persistent: no