Search Operations |
Top Previous Next |
|
Finding Text In Data Files
Several text search and replace functions are available to you when an editor window or a project tree window is active. In either case click the binoculars icon on the toolbar or select Find (or Replace) on the Search menu to bring up a dialog with search options.
Finding Text in an Editor Window If you invoke the dialog when text is selected (highlighted) then the Find what box is initialized with this text. When you click the dialog's Find next button, the editor scrolls to and highlights the first occurrence of the target text following your current position in the file. Thereafter, you can simply click the arrow icons on either side of the binocular icon to move to additional occurrences in the text. The Regular Expression option should be left unchecked if you're not familiar with the term (see below). The Ignore case and Match whole words options behave as you would expect, with or without the regular expression option enabled.
Replacing Occurrences of Matched Text in an Editor Window There is also a text replace function accessible by selecting Replace in the Search menu. (There is no toolbar icon for this.) The dialog is similar except that both Find what and Replace with fields are present. The dialog also stays open as matches are found and highlighted. Along with the Find Next and Replace buttons there is a Replace All button that replaces, without prompting, all remaining matches in the file starting with the current highlighted match. If during this operation the file's end is reached while at least one match exists at a position earlier in the file, you are prompted to either highlight the first match or leave your position in the file unchanged. If you want to confirm each replacement, be sure to click the Replace button successively instead of Replace All.
Finding All Occurrences of Text in a Project Branch When a project tree window is active, you can search across all files in a selected tree branch, whether or not the files are open for editing. The Search Branch Files for Text dialog, like the Find dialog, is invoked by clicking the binoculars icon, or by selecting Find on the Search menu. An option in this dialog specifies whether or not detached branches should be searched. When you click the Search button, all files that have at least one occurrence of the specified text will be flagged with a red check mark on the project window's tree diagram. Subsequent opening of a checked file will automatically position the cursor at the first highlighted match. You can then move to additional matches in the file by clicking the Find Next toolbar icon (the right-pointing arrow). Alternatively, while the file is open, you can invoke Replace on the Search menu to perform a search and replace operation using the same target string. The check marks remain on the tree diagram until you perform another search, or until you select Clear Chks in the dialog.
If your project contains a large number of data files, you might want the ability to review in one window the detailed results of a project-wide search operation. You could then open files by clicking links in this window (highlighted matches), or perhaps execute a global search and replace operation. Accessing Walls from Other Applications describes how another program can be integrated with Walls to provide this capability.
Using Regular Expressions If you know the rules for forming character strings known as regular expressions, you can use them to perform searches and replacements involving wildcards and/or special conditions. If you don't know the rules then leave the Regular expression box in its default non-checked state. Unless you're a programmer at heart, the benefit of this option may not be large enough to justify learning the rather arcane syntax. If you're still interested, see Regular Expression Searches for some examples and references.
Finding Vectors in Compiled Data
If either the Geometry page or Traverse page is active, a search operation can locate the component, loop system, and traverse (if any) containing a specified vector. Upon clicking the binocular icon you are prompted to enter a pair of station names in any order. When a search is successful the appropriate component (traverse or vector) is highlighted on the page. If one or both of the names you enter is missing a prefix, say A1 instead SURFACE:A1, multiple matches are possible, in which case the Find Next and Find Previous functions (right and left arrow icons) allow you to traverse the sequence of matches with progress shown on the status bar. Note that a vector in the compiled database doesn't necessarily belong to a loop system traverse. For such vectors the search fails and you are given the option to locate it on the preview map instead. (Also see Locating a Vector in the Geometry.)
When the Map page is active a similar search capability is available. The difference is that you are prompted for one station name instead of two. If the station is found on the preview map, the map is scrolled as necessary and the station is enclosed in a small tracker rectangle. At this point you can zoom the view and click the Find Next button to reposition the tracker, and so forth, to obtain a more detailed view of the region of interest. As with vector searches, multiple matches are possible here as well.
Other Ways to Find a Vector or Station When you are editing a data file, a much simpler way to find a vector in the statistics (Traverse page) or on the preview map is to right-click a line where a vector is defined. If the vector is represented in the compiled project item under review (Review dialog open), two selections, Locate vector on map and Review Statistics, will be enabled on the right-click context menu. Those selections will bypass the search dialogs completely while avoiding any ambiguity that could result in multiple matches.
Finally you'll notice that as you move the mouse cursor over a displayed screen map vector lines and station flag symbols are automatically highlighted. (Vector highlighting is enabled when a screen pixel represents two meters or less.) Right-clicking in a surrounding rectangle pops up a context menu from which you can jump to either the traverse page (if applicable) or the data file where the vector or #FIX station is defined. For more information see Vector Properties Window. |