Many process environments are expansive, and the process system's pictures or schedules may reference many sources of data throughout the plant. If you need to reroute certain data to another node, or globally change a data source throughout a plant, you can use the Find and Replace feature from the Edit menu.
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.
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.
Include Scripts - Finds text in the scripts associated with the current picture or schedule.
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.
You cannot undo a Find and Replace operation and the text you enter as the replacement string appears exactly as you enter it.
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, as follows:
Select Find and Replace from the Edit menu.
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:
One of the most powerful options you have when finding and replacing data is the ability to include wildcards in search strings and the replacement text you enter. You can enter any of the following wildcards:
* - Finds zero or more characters.
? - Finds any single character. For example, the search string TAN? locates the string TANK. It also locates the string TANKS.
When replacing data, the wildcard only lets you substitute one character for the wildcard. For example, if you replace TAN? with TANZ, the resulting strings are TANZ and TANZS.
\ - Finds wildcard characters in the search string. For example, \* locates an asterisk (*) in the property values being searched.
To make your searches more effective, use these guidelines:
If the search string has wildcard characters, the replacement string must have the same wildcard characters or none at all.
If the search string has no wildcard characters, the replacement string cannot have any wildcard characters.
Do not use * and ? in the same search string.
The table below details some examples of using wildcards with Find and Replace.
|
Property Value |
Search String |
Replacement Text |
Modified Value |
|---|---|---|---|
|
NODE1.AI1 |
N*.A* |
M*.B* |
MODE1.BI1 |
|
NODE1.AI1 |
*.AI1 |
NEWNODE.A |
NEWNODE.A |
|
NODE1.AI1 |
*.* |
N2.A2 |
N2:A2 |
|
NODE1.AI2 |
NOD*.AI* |
BE*.CO* |
BEE1.CO2 |
|
MIXER1.AI3 |
MIXER1.A?? |
MIXER1.D?? |
MIXER1.DI3 |
|
*Alarm Area Mixer* |
\*Alarm Area Mixer\* |
-Alarm Area Mixer- |
-Alarm Area Mixer- |
By default, finding and replacing data in DeltaV Operate does not search in the scripts associated with the current picture or schedule. However, you can search in event scripts by selecting the Include Scripts check box. Declarations, forms, class modules, and other scripts are not searched by DeltaV Operate. To search in these scripts, use the Visual Basic Editor (VBE). For more information on using the VBE, refer to its online help.
DeltaV Operate lets you add find and replace capabilities to your scripts using the IFindReplace interface in the FixScriptGlobal object. Refer to Writing Scripts or to the Automation Interface online help for more information.
In order to use the Find and Replace command on User Globals, you must right-click the User icon in the Globals folder in the system tree, and select Find and Replace from the menu. You cannot perform a Find and Replace on User Globals by selecting Find and Replace from the Edit menu. That menu belongs to the active document only.
Note that the Find and Replace dialog box displays the name of the document being searched in its titlebar. For example, if you perform a Find and Replace on User Globals, Find and Replace User appears in the titlebar.