Find and Replace
Searches the texts of the project, shows every match in a table, selects the objects that hold them and replaces the matches in one step.
Find and replace texts
Opens the Find and replace texts window. It searches single-line texts, multiline texts, the texts that dimensions write instead of their measured value, the labels of leaders and, if you ask, layer names. The window is not modal and follows the project: the table updates when the drawing changes.
Where to find it
Tools tab → Data group → Find and replace texts (Find and replace texts).
Before you start
- A label that shows another object's value (an elevation, a length) has no text of its own and is not searched.
- A dimension is searched only when it has its own replacement text.
- Texts on locked layers are listed but never changed.
How to
- Click Find and replace texts. The cursor is in the Find box.
- Type the text to look for. The table fills in about a quarter of a second after you stop typing.
- Type the new text in Replace with. The Becomes column shows the result for each row.
- Choose rows in the table (Ctrl or Shift to pick several).
- Click Replace for the picked rows or Replace all for every row. The whole change is one undo step (Ctrl+Z).
- To look at the objects first, click Select (picked rows) or Select all. The objects are selected in the 3D view.
Parameters
| Field | Meaning |
|---|---|
| Find | The text to look for. Empty means nothing is searched ("Type what to find." appears below). |
| Replace with | What the matches become. With Regular expression, $1, $2 stand for the groups of the expression. Otherwise it is inserted as typed. |
| Match case | Off by default: upper and lower case are the same. |
| Whole word | The match must not touch letters, digits or an underscore on either side. |
| Regular expression | Reads Find as a regular expression. |
| Layer names | Also searches the names of layers. The default layer keeps its name. |
| Selected objects only | Searches only the texts of the currently selected objects. The table follows the selection. |
The settings of the window are remembered.
The table
| Column | Content |
|---|---|
| Kind | Text, Multiline text, Dimension text, Leader text or Layer name |
| Layer | The layer of the object, or the layer whose name matched |
| Text | The text now (line breaks shown as spaces) |
| Becomes | The text after replacing; empty for a locked layer |
| State | Locked layer when the text cannot be changed |
Click a header to sort. Rows are ordered by layer name, then by kind.
Buttons
| Button | Enabled when | What it does |
|---|---|---|
| Select | Picked rows include an object | Selects the objects of the picked rows. Layer names have no object. |
| Select all | Any found row has an object | Selects the objects of every row |
| Replace | A row is picked | Replaces in the picked rows (one undo step) |
| Replace all | The table is not empty | Replaces in every row (one undo step) |
| Close | Always | Closes the window |
After selecting or replacing, a line under the table reports Selected objects: N, or Replaced: N in M texts., with Skipped, locked layers: N. and the layer names when some were skipped, and Left as they are: N. for rows that no longer match, the default layer, or a layer that would end up with an empty name.
If something goes wrong
| Message | What to do |
|---|---|
| Type what to find. | The Find box is empty. |
| A red text with the expression's error | The regular expression is invalid; fix it. Nothing is found until then. |
| Nothing found | No text matches. Check the options. |
| Locked layer (in State) | Unlock the layer first; the text is skipped otherwise. |