Configuration variables: Basics
Configuration variables are used for the creation of sets of rules. They offer the possibility to influence the user interface in the Project Builder and communicate between Macros, Macro-Typicals and Typical-Groups. Use configuration variables to define dependencies or to carry out calculations. Depending on their intended use, you require a specific variable type.
Configure the user interface of the Project Builder
Configuration variables are used to configure amongst other things parameters and their input fields for the Project Builder. These input fields, their function and the appearance can be defined in more detail under Properties of the respective configuration variable. Use configuration variables if you want to give the engineer the possibility to change specific values and access macro variables. You can define these properties:
- Displayed name: Enter the displayed name of the configuration variable. This name is then displayed in the Project Builder.
- Type: Select a variable type. You can select between the following types:
Variable type Meaning Example Integer Integer values 1, 2, 3 Double Floating-point number 3.456 String String EPLAN Boolean Two possible states true orfalse - Mandatory: Activate the check box if you want the entry of a value for the variable to be mandatory in the Project Builder. Such input fields are identified by an *.
- Visibility: Design the input field dynamically. It will only be visible in the Project Builder under certain conditions. Additional information is available here.
- Selection values: Specify values if you want the engineer to have to select one of the values from a drop-down list in the Project Builder. The free entry of a value is then no longer possible.
Define internal rules
Apart from the configuration of the user interface you can also define internal rules for configuration variables that are not directly visible in the Project Builder.
Work with formulas
The input field or the Editor button is located at all points at which you can work with formulas. In addition to the classic formula input, additional editing options are available in the editor.
In addition to the formula input, you can also enter comments into the formula editor in order to document formula contents or store an editing history, for example. You can either store one-line or multi-line comments in the editor. It is also possible to formulate multiple comments for a formula.
Each formula must start with an "equals" sign, e.g.
Operator | Meaning | Valid for | Example |
---|---|---|---|
|
Arithmetic calculation | Integer, double |
|
|
Literal |
|
|
|
Linking of strings |
|
|
|
Comparison operators | Integer, double |
|
|
Logic operators | Boolean |
|
|
Alternative notation for the logical operators |
Boolean |
|
or Condition ? Value1 : Value2 |
Conditional values | All | or |
|
Begin with a one-line comment with these operators. | All |
|
|
Begin and end with a multi-line comment with these operators. | All |
|
Note
- Comments that you enter in the editor are not displayed in the input field.
- Comments must always follow the "equals" sign = and must not precede the formula.
- The use of brackets in a formula follows the general mathematical rules. Expressions in brackets are calculated first.
- Editor