Find and Replace tab

Find and Replace

Figure 1: Find and Replace tab

This tab is used to search for all the instances of a string of characters (search is not case sensitive) in the entire environment and replace it.

You can re-use one of the last ten entries or type a new text string.

Call Out# Description

The operation can be performed across:

  • All documents: Search all files of the project and the dictionary.
  • Dictionary: Search the dictionary.

The search string can be with a complete word only.

  • When this option is selected, the search is case sensitive.
  • When selected, only the instances that match the complete words defined in the Find what field are selected.
    • Example: A search for "MyVar" returns "MyVar" but not "MyVariable".

To optimize a project, the Find Unused Variables option is used to perform a search in the dictionary to locate variables not used in any program.

  • A variable is not used when there is no effective usage of it in your entire project.
    • It can still be the case even when a value is assigned to a variable (e.g., MyVar := 100. * Axis1.Velocity;).
    • The variable MyVar becomes used when it is affected as an input argument (e.g., Velocity := MyVar ;).
  • Select this option and click Find to generate a list of the unused variables.
  • You can select one or more variables (by Shift- or Ctrl-clicking) and right-click to open the context menu.
  • The menu includes a Delete option (Figure 2).
  • Double-click a variable in the list within the table widget to open it in the Dictionary.

Figure 2: Find and Replace tab with Delete menu option Selected

Use the Replace... button to replace in all documents a string with another one (or re-use one of the last ten entries).

  • The search can be refined by forcing the search to a Whole word, and may be case sensitive or Case Insensitive (Figure 3).
  • The replace function is limited.
    • It is not supported in the Dictionary, Pipe Network, and HMI.
      • For these, the change must be made manually.

Figure 3: Replace in Files dialog box

Once the search is done, the results appear in the table widget at the bottom of this tab.

If a replace has been performed, the Text column provides more information about the replacement.

Double-click the applicable item in the list to open it in its relevant location (it can be a PLC editor or the Dictionary).

Location Details

See Find and Replace Operations.