CADXChange

Guides/Drawing standards

Change a Tag Number in Every Drawing — Find It, Edit in Excel, Write It Back

Made with DwgSearch
DwgSearch results for a valve tag, found in block attributes and notes of several drawings

Short answer: FIND works in the open drawing. For a folder, first find out where the value is, then change exactly those places, then search again to prove nothing is left.

A renumbered valve can be an attribute on one sheet, a note on another and both on a third. Missing one of them is the real risk.

This guide uses three tools of CADXChange Toolkit in a row: DwgSearch finds and exports, BlockSync writes attributes, TextSync writes notes. The example changes HV-101 to HV-201 in six drawings.

1. Search the folder

Open DwgSearch, click Choose Folder… and wait for the index. Under Search in:, include text, multiline text and block attributes, type the tag and search.

Read the list before changing anything. A longer tag that contains the same characters is also a hit, here HV-1010, and so is a sentence that merely mentions the tag. Locate shows a hit in the drawing.

2. Export the hits

Click Export to Excel and save the workbook in the drawing folder. Attribute hits go to one sheet per block, with every attribute of each block found; notes go to the Text sheet. The columns starting with an underscore say where each row came from.

Only single-line text, multiline text and blocks are exported. Hits in tables, multileaders, dimensions and inside block definitions can be found but have to be edited in the drawing.

The exported valve sheet with five tags, one of them the longer tag HV-1010

3. Change the values in Excel

First delete the rows that must not change, such as HV-1010, which a replace would turn into HV-2010. Then select the tag column on the block sheet and replace HV-101 with HV-201, and do the same in the Text column of the Text sheet. Limit Find and Replace to those columns so file names and the identifying columns stay as they are, and save.

The Text sheet after replacing HV-101 with HV-201 in four notes

4. Write the attributes

Close the drawings. In BlockSync choose Excel → Blocks and pick the workbook. Check the preview of old and new values, keep Automatic backup on and click Write Selected Files.

5. Write the notes

In TextSync choose Excel → Text and pick the same workbook; it reads only the Text sheet. Check the preview and click Write Back.

6. Search again

Refresh Index in DwgSearch, then search for the old tag and the new one. DwgSearch also reads subfolders, so the backup folders next to your drawings still show the old value, under the same file names. Move them elsewhere, or choose a backup folder outside the searched folder. In the example the old search then returns only HV-1010, and the new tag appears in all eight places.

Rollback All in each writing tool restores the drawings it changed. If both tools wrote to the same drawing, undo in reverse order: TextSync first, then BlockSync.

DwgSearch is free. Writing with BlockSync and TextSync is covered by the 30-day full trial of CADXChange Toolkit and afterwards needs a licence.

Try it on your own drawings

CADXChange Toolkit does this for a whole folder of drawings, with a preview and a backup first. The 30-day trial has every feature.

Start the free trial →

Before you start — common questions

How do I find every drawing that contains a tag number?
Choose the folder in DwgSearch and search for the tag. The results list the file, layout, block, kind of object and matched content.
Can I replace directly in the search results?
No. Export the hits to Excel, edit them there and write them back with BlockSync and TextSync, which show a preview first.
Is the search export free?
Yes, searching and exporting in DwgSearch are free. Writing changes into drawings needs the trial or a licence.
Do I need AutoCAD?
No. All three tools read and write DWG files themselves.

Related guides