# How can I reset all part names in Eagle PCB?

I've built a large PCB, which merges about 17 schematics. There are about 1000 components on the board.

What I need to do now is rename all of the resistors and capacitors. Currently the parts are named R1, R2, etc, and I want to reset the names to G$1, G$2, etc. so I can rename everything with the correct part numbers. Is there something built into Eagle to rename all of these components?

I've searched through Eagle's ULP scripts, but I can't seem to find one that does this.

• You should leave them as R1 and R2. Renaming all those parts will make your schematics very hard to read. You should place the part number as an attribute of the part (use the attribute button), then run the bom ulp and you can export everything to a nice spreadsheet. – rigs Apr 16 '15 at 19:38

There is a ULP script called renumber-sheet.ulp provided in the default Eagle installation for renaming parts; however it renames each prefix starting with 1 (e.g. R1, R2..., C1, C2...) which is not what you want.

There is a script called renumber_by_page.ulp at this location (bottom of the page). It works a little differently, as it renumbers it keeps the part numbers for all parts in sequence regardless of prefix, so it will renumber parts R101, R102, C103, C104 etc. More like what you want but not quite.

But wait, there's more.

Instead of renumbering the parts automatically, it creates a script called rename.scr which looks something like this:

EDIT .s1;
NAME 'BAT1' 'old_BAT1';
NAME 'C1' 'old_C1';
NAME 'C2' 'old_C2';
NAME 'D1' 'old_D1';
NAME 'D2' 'old_D2';
etc.
EDIT .s1;
NAME 'old_BAT1' 'BAT100';
NAME 'old_C1' 'C101';
NAME 'old_C2' 'C102';
NAME 'old_D1' 'D103';
NAME 'old_D2' 'D104';
etc.


So before running it, if you edited the prefixes in the second group, e.g. 'C to 'G$, 'D to G$ you would have what you want I think (if I understand your question correctly). This could either be done manually with a text editor, or via a script written in AWK or Python etc.