Rename Variables

Variables may be renamed from within the Dictionary.

  • The renaming function can either replace a section of the name or append text to variable names.
  • The search will find and replace matches first within the Dictionary and will then continue the search within programs in the current project.
  • You will have the option to propagate the changes to programs or not.

Procedure

  1. Right-click on any variable in the Dictionary and select Rename variables. (Figure 1)
  2. Figure 1: Rename variables option

    The Rename Variables dialog box opens. (Figure 2)

    Figure 2: Rename Variables dialog box

  3. In the What text box, enter the phrase to be replaced
  4. In the Replace text box, enter the new phrase.
  5. Click the Where drop-down arrow and select the replacement method.
    See Where for the options and their results.
  6. Click OK to make the changes shown in the Results frame.
  7. When matches exist within programs, the Replace in files dialog box opens. (Figure 3)

    Figure 3: Replace in files dialog box

  8. Use the dialog box to choose which programs to modify.
  9. Click OK to save the changes or selections and close the dialog.
    The programs are modified in the order they appear in the list.

Controls in the Rename Variables dialog box

Control

What it Means

What

Enter the variable name/text to be replaced.

Replace

This new text replaces the current variable name text.

Where

Choose where the replace occurs:

Everywhere

Searches the entire variable name. (Figure 4)

Figure 4: Rename Variables dialog box - Where = Everywhere

Prefix

The search/replace starts from the first character in the variable name.

Figure 5: Rename Variables dialog box - Where = Prefix

Suffix

The Replace text is appended to the What text, completely replacing any matches. (Figure 6 and Figure 7)


  • Be aware that this search method completely replaces the search string.
    Use this method with caution.

Figure 6: Example 1: Rename Variables dialog box - Where = Suffix

Figure 7: Example 2: Rename Variables dialog box - Where = Suffix

Match Case

The search is case sensitive.

Results

The search results and proposed changes are shown in this box.