Tag find and rename
Tag find and rename feature will rename a tag reference inside the entire project.
Note this feature can be used not only to rename tags, but even to change values from each columns of the tags editor
Parameters | |
---|---|
Column |
Select the column to modify with the find and rename operation |
Rename Names in Dictionary |
The tags’ names rename will be extend to rename even to the internal dictionary tags’ names. This parameter is useful when you have to substitute the dictionary with another dictionary that contains renamed tags This parameter is available only when the selected column is “Name” |
Find what | String to search |
Rename with | String to replace |
Case sensitive |
Takes account of upper and lower case letters |
Use regular expression |
Enable regular expression in search/replace pattern See https://en.wikipedia.org/wiki/Regular_expression for additional details regarding regular expressions. When regular expression is enabled, the “Find what” parameter will not offer predefined values but only free text handling. |
RENAME SELECTED
Execute the rename only for the selected tags
RENAME ALL
Execute the rename for the entire tags database
References used in Java script and within custom widgets will not update.
Undo is not supported for this command
Regular expression example
Using the tags list of the above picture.
If you want add a prefix to all tags you don’t need to use regular expression:
Find what: | MRTU | |
Rename with | PLC01_MRTU |
But if you want add a postfix, you need to use a regular expression:
Find what: | MRTU(.*) | |
Rename with | MRTU\1_PLC01 |
Where
(.*) |
is meaning any sequence of characters | |
\1 | is a copy of the first sequence of characters enclosed by (...) found inside the search string |
If you want to remove a prefix, you need to use regular expression:
Find what: | ^(prefix) | |
Rename with | empty |
For example, the filter in the following figure:
Produces this result: