Finding and Replacing Data
Many process environments are expansive, and may include pictures or schedules that reference many sources of data for operations in different locations throughout your plant. If you need to reroute certain data to another node, or globally change a data source throughout a plant, you can do so quickly, without disrupting operation or using valuable resources by finding and replacing data.
Finding data locates values of picture and schedule properties that match the search string. It also locates property values of objects in your pictures. The search string you enter indicates the data you want to locate and optionally replace. Any property value that matches this text appears on the Find tab. On the Replace tab, only values you can modify appear.
Find Options
You can select any of the following options when finding data:
Match Case – Finds text that matches the exact case of the search string.
Whole Word Only – Finds only whole words that match the search string. A whole word is any text delimited by a carriage return, a line feed, a space, a hyphen (-), a semi-colon (;), a colon (:), a comma (,), a period (.), an underscore (_), an exclamation point (!), quotation marks ("), apostrophe ('), parenthesis ( ), braces { }, or brackets [ ]. This means that a typical data source, such as Fix32.MIXER1.AI1.F_CV contains five words.
Data Source Only – Finds only data sources that match the search string.
NOTE: If a data source used to animate an object has its Data Conversion type set to Object, the data source is ignored during all Find operations.
Include Scripts – Finds text in the scripts associated with the current picture or schedule.
Replace Options
When replacing data, you can select from the following options:
Replace Selected – Replaces only the property values you select.
Replace All – Replaces all property values found.
Replace Preview – Displays the results of replacing all property values in the Replace Value With column.
NOTE: You cannot undo a Find and Replace operation and the text you enter as the replacement string appears exactly as you enter it.
Notes on Special Characters in Search Strings
When you use wildcard characters such as the * or ? character in your search string, text containing the following special characters will not be found even if it satisfies the search criteria:
" ' ( ) * + ; ? @ ^ ' { } ~
For instance, if you want to locate [email protected] and enter j*com as your search string in the Find What field, the [email protected] term is not found, since the text includes a special character (@).
Example: Finding and Replacing Data
Assume you want to replace all of the tags in a picture from MIXER.AI_VALVE_OPEN to MIXER.AI_VALVE_CLOSED. One way you can change these value is to perform a whole word find and replace.
To perform a whole word find and replace:
- On the Edit menu, click Find and Replace.
- In the Find What field, enter MIXER1.AI_VALVE_OPEN.
- Click the Replace tab, and enter MIXER1.AI_VALVE_CLOSED in the Replace With field.
- Click Replace Preview to view the resulting values in the Replace Value With column.
- Click Replace All.
If you find and replace a tag which returns numeric data only, such as F_CV, with a tag that returns non-numeric data, such as A_CUALM, Data links that are connected to this tag will no longer appear to update. For example:
If you replace... |
With... |
Then the Replace will... |
F_CV |
A_CV |
Works for analog tags where the A_CV is simply a string containing a number. |
A_CV |
F_CV |
Work without errors. |
F_CV |
A_MODE |
Not work. |
F_CV |
A_CV and then A_MODE |
Not work because the tag was originally a number. |