There’s a lot of ways to burn up your time when designing PCBs, but renaming components can be one of the most frustrating. [Joe Pinzone] wrote in with his solution to the problem. Instead of hunting for each part on the schematic to change them one at a time, he makes a list of the substitutions and then uses a script to make all the changes in the XML files. He didn’t publish a post about his work, but you’ll find the source code he wrote embedded after the break.
The straw that finally broke the camel’s back was a project that included about two hundred components which didn’t seem to have a naming order that made any sense with the actual values of the components. The script is written in C++ (for Windows but [Joe] says this should be easily ported to other systems as well). To use it he creates a CSV file with the current component names in the first column. He then goes through and types what he wants for the new name in the second column. This CSV, along with the BRD and SCH files are then given as inputs for the script (through selecting them all and dragging to the script or as CLI arguments) and it automatically makes the changes.
Of course this is only possible because Cadsoft transitioned to using XML files in Eagle 6.
Continue reading “Renaming Parts In Eagle CAD By Editing The XML Directly”