Templates and instances
General explanation
With the template and instance function, group structures with the same layout can be created quickly and easily. In addition, a link can be made. If the template is changed, the instance also changes, if desired. The template and instance function can currently be used for the following configuration elements:
Create a template
At the beginning, a "group" must be created as a template. Here it is possible to create additional variables that can subsequently be used for the names of the individual objects (templates and instances). These variables can also be edited in the template group under "Details".
If a group is created as a template, all sub configuration items and groups are also templates.
Using variables, for example, an individual prefix per instance can be created quickly and easily for any number of signals. Depending on the "type", a default value can also be defined, which appears as default in the instance. To keep the input of variables in the instance within a defined range, there is the possibility to define a validation by means of a “regular expression” or a min-max range.
Afterwards, one of the available configuration elements can be created as a template object. Here is an example based on a signal template. For this, the text from the variable definition must be placed in this bracket type {...}.
Signals that are created as templates do not count in the signal count of the administration.
Once a group has been defined as a template, "OOAttributes" fields (Object Oriented Attributes) appear in each of the possible template configuration elements. These optional fields can be used to define how the instance should behave:
Optional möglich | Definition |
---|---|
Locked: Instance fields are provided with a lock that cannot be opened. The instance field always corresponds to the template. | |
FillInVariables: If you want to work with variables, this field must be activated. | |
ResolveRelative: If a data source and data connection should also be created with the signal, this field must be activated. |
Creation of an instance
If an instance should be created from a template, a group must be created as an instance (Attention: do not create under a template). The "Instance of" field only appears after the first "Save". Afterwards, the instance can be updated on the right to load or update the configuration elements from the template.
If a template is changed, the instance changes only after a manual "refresh".
After the update, the instance signal has been created as follows. The lock symbols can be clicked and opened in the default. Then the instance field can be changed. However, if the "Locked" function has been stored in the template field, the corresponding instance field cannot be changed.
If several instances should be updated subsequently at once, this can be done most easily via the template group under "Details". All instances generated from the template appear here.
Innerhalb der Instanz-Gruppe können unter “Details” die angelegten Variablen beschrieben werden. Anschließend wird der Wert in jedem Feld, in dem diese verwendet wurde {Text_Variable}, eingetragen.