Find and Replace Text
text_find_replaceFind and replace literal text in AutoCAD TEXT, MTEXT, and block attributes, including definitions, with optional case matching and dry-run preview.
Instructions
Replace text in TEXT, MTEXT and block attributes (ATTRIB and ATTDEF).
searched_types is on the response because "no matches" and "that type was
never searched" are different answers. Block definitions are included, so
the next insert does not reintroduce the old text. DIMENSION text is out of
scope: its text field holds the <> override placeholder rather than the
measurement, so editing it would break the association. A multi-line
attribute is matched and rewritten as the whole value (Line1\PLine2),
the same value block_get_attributes reports and block_explode bursts.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| find | Yes | Literal text to search for (not a regex). | |
| layer | No | Restrict to one layer. Empty searches every layer. | |
| dry_run | No | Report what would change without changing it. | |
| replace | Yes | Replacement text. | |
| match_case | No | Case-sensitive search. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||