You have opened a project.Project > Properties. Select the Properties tab and select, for example, the Block property: Replacement text [1] property.
Use this dialog to define a table with replacement texts. Based on such a table, the values of a property (block property or formatted property in a report) can be replaced by other texts. This way, numeric values, Boolean values (True / False, Yes / No, etc.) or monolingual texts can be replaced by multilingual, meaningful texts.
Overview of the main dialog elements:
In the table, you define the texts with which to replace the values of a property.
Operator:
In this column you choose a comparison operator for comparing the value of a property with the source text.
Note:
If you select the "Regular expression" entry here, the value is compared with the source text on the basis of a regular expression. (This setting should be used only by advanced users who are familiar with the use of regular expressions.)
Source text:
Here you enter the comparison value that is to be compared to the selected property. It is case-sensitive.
Output text:
Here you enter the text that is to replace the value of the selected property.
Note:
The texts in the fields Source text and Output text can be entered as multilingual texts. In the case of automatic translation (Translate on input option is activated in the translation settings), these texts are not considered; they can be only translated manually (Popup menu > Translate).
On a placed function in the schematic, you want to display whether the function is a main function. To do so, in the property dialog, you select the Main function (ID 20122) property as the format element of a block property (e.g., the Block property 1: Format property via the format elements "Function property > General function properties"). In the property list, on the first tab, the value "X" is displayed for the Block property 1 property for a main function; for an auxiliary function, no value is displayed.
To replace these values with more meaningful texts, for the Main function property, set the Replacement text field in the Format: Block property dialog to the "Use table 1" entry.
To replace the text in the block properties, define then in the project properties the following table for the Block property: Replacement text [1] property:
Operator |
Source text |
Output text |
Continue |
---|---|---|---|
= |
X |
Main function |
|
= |
|
Auxiliary function |
|
Subsequently, the values of the Main function property on the placed function are replaced by the output texts.
For many devices, the Block property 1 property is part of the default property placement. As a result, the text "Main function / Auxiliary function" for the placed function is also displayed in the graphical editor as property placement.
Continue:
Activate this check box if several regular expressions are to be executed consecutively. By this means you can, for example, replace several blanks consecutively.
If the regular expression is only to be executed once, leave the check box deactivated (default setting).
You have selected the property Technical characteristics (ID 20027) as a format element of a block property. In this property the following values are for example entered: Voltage 24 V or 12VDC or Power 2.5W. Now you want to cut out and display only the numerical component from each of these values.
First set the Replacement text field in the Format: Block property dialog to the "Use table 1" entry for the Technical characteristics property.
To replace the text in the block properties, define then in the project properties the following table for the Block property: Replacement text [1] property:
Operator |
Source text |
Output text |
Continue |
---|---|---|---|
Regular expression |
^[^0-9]* |
|
|
Regular expression |
[^0-9]*$ |
|
|
Then the values of the property Technical characteristics are replaced by the output texts 24, 12 or 2.5.
Popup menu:
The popup menu provides - depending on the field type (date, integer, multilingual, etc.) - the following menu items:
- Popup menu items for the display of tables
- Popup Menu Items for the Editing of Values
- Popup Menu Items for Multilingual Texts
See also