PCB: Printed Circuit Board CAD package

Bulk rename of components

Reported by Ben Gamari on 2012-04-03
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pcb
Undecided
Unassigned

Bug Description

Often while composing boards with many repeated functional blocks (with components named hierachically for convenience), I'll delete the components of all but one of the blocks, layout the remaining block, and copy this block. This is quite easy as Select By Name support regular expressions.

Unfortunately, after copying the block I still need to rename the copied components. While for small blocks I'll often do this by hand, for larger blocks I tend to save only the block to a layout, rename the components with a regular expression in a text editor, and import the modified design. I repeat this as many times as necessary. While this works, it's quite ugly and very inefficient.

However, this task could be very straightforward if pcb had the ability to run a regular expression substitution on the names of a selection of components. This way you could select a functional block, run "s/stepper1/stepper2/" and move on with life. A simple solution to a simple problem.

Ben Gamari (bgamari) wrote :

This is definitely a step in the right direction, although it's not quite what I need as I use hierarchical names (e.g. stepper1/R5, stepper2/R5, etc.). It does seem that it could be modified easily enough, however.

Ben Gamari (bgamari) wrote :

It would be slightly easier if Ubuntu distributed -dev packages. Currently it seems one must build from source in order to compile a plugin.

DJ Delorie (djdelorie) wrote :

Our plugin system doesn't have a "well defined API" so plugins are always compiled against a built tree.
As for packaging, that's up to the individual package maintainers, not the core dev team. They can add a -dev if they want.

Ben Gamari (bgamari) wrote :

Here is my adaptation of your script to deal with hierarchical names (although not very robustly). A better option may just be to implement a regular expression plugin.

Ben Gamari (bgamari) wrote :

This script can be found in https://github.com/bgamari/pcb-sedrename

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments