17.5 Find, replace and search

You can quickly search for and modify text and formulas at nodes in a tree using the Find/Replace tool. With some exceptions, this is often the best way to change a formula that appears in many payoffs, definitions, or other expressions. It is also often useful for simply finding particular nodes.

The Search Tree Dialog

  • To open the Search Tree dialog:

  • Choose Tree > Find from the menu.

  • ... OR ...

  • Click CONTROL + F on the keyboard.

The search dialog will default to "Search Open Trees" tab with "Search active tree only" checked. This will search only the currently active model.

The Search Tree dialog allows you to find and/or replace specific text in certain portions of the model or throughout the entire model.

To find text in a tree:

  • Open the Search Tree dialog.

  • Enter text in the box labeled "Find what".

  • Choose the matching options ("Whole word only" and "Case sensitive").

  • Choose one or more search location(s).

  • Click the Search button.

If you check the "Whole word only" option, TreeAge Pro will not search for partial word matches. If "Case sensitive" is checked, matching text must have the same combination of upper and lower case letters as the search text that you specify.

The locations refer to portions of the tree which should be searched for the search text.

The search results are then presented in the Search View.

To replace text in a tree:

  • Open the Search Tree dialog.

  • Enter text in the box labeled "Find what".

  • Choose the matching options ("Whole word only" and "Case sensitive").

  • Select one or more search location(s).

  • Click the Replace... button.

The Replace Text Matches dialog will open to prompt you to enter the replacement text.

You then have two options for replacing text. If you click OK, all occurrences of the Search Text that fit both the matching options and search locations will be replaced.

If you click Preview, then a Replace Text Matches preview dialog shows all replacements that could be made by this action.

The Replace Text Matches preview dialog allows you to examine all the changes that would be made to the model, including the differences in the file structures between the "before change" and "after change" file states. You can select which of the changes you want made, then click OK to process the changes.

The Replace command is not recommended for changing a variable’s name. Instead, edit the variable’s properties in the Variables and Tables list.