3 Configuration File

Configurable variables and records can be redefined by the user in the configuration file.

The configuration file can be loaded with DM_LoadProfile.

Within the configuration file, any number of entries of the following scheme are valid:

Syntax

<variable> := <value> ;
<record> . <attribute> { [<index>] } := <value> ;

// <comment up to end of line>
/* <comment, multi-line too> */

<variable> has to be indicated as configurable with config.

At <record>, <attribute> has to be .configurable true, and the wished attribute has to be available as DM-internal or user-defined attribute.

These attributes can optionally also be addressed indexed. Then, however, they have to be defined in the corresponding record.

As <value>, all constant values are permitted which can be used when defining variables with initialization and when initializing user-defined attributes. The corresponding values' data types have of course to match the variables' and the record attributes' data types.

Example

Dialog Script

dialog Example

config variable string Name := "Jack";

color C1 "red";
color C2 "green";

model window WinMod
{
  .bgc C1;
}

record Settings
{
  .configurable true;

  boolean Mode[3];
    .Mode[1] := true;
    .Mode[2] := false;
    .Mode[3] := false;

  object Windowcolor shadows WinMod.bgc;
}

Configuration File

// configuring a variable
Name := "Peter";
// configuring a record
Settings.Mode[2] := true
// the model is configured directly with shadows
Settings.Windowcolor := C2;