Repeating the same layout for identical subcircuits

Dear all,

as an info at the begining: this topic is not about panelizing :wink: I have a schematic with several subcircuits which are completely identical to each other. I was wondering, if there is a way to design one of the subcircuits and then copy the layout over to the other subcircuits. This would be a really funny feature but perhaps it is already existing. I’ve figured that there is a duplicate [CTRL+D / OpenGL Canvas] feature but unfortunately the labels of the footprints of the duplicate stay the same. Thus I assume, that this feature is meant to be used for panelizing and it means that the signals, footprints and nets of the duplicate would not correspond to schematic any longer. It’s kind of logically to me, cause how should pcbnew know how to pick the right footprints, … for the duplicate ?

May be it is possible that the duplicate gets footprints and nets with empty labels and then you have to hit a button which causes a window to pop up which enables you to choose the right footprints, nets … out of a list? Well this just crossed my mind … :wink:

I’m well aware that this a big heap of work but … it would be such a nice feature … :wink:

Have fun,


Demanded in the past… comes up every 6 months I think and ‘big heap of work’ is an understatement if you were to ask a developer.
Thing is, EEschema is being worked on to allow features like this, as you need the schematic to play ball to enable PCBnew to do this.
Don’t hold your breath though, will definitely take a while.

Even when you have copied your block, sometimes the silkscreen “R1” will fit nicely, but on the next block “R101” sits on top of pads

Look here

It is a workaround I made for myself to do exactly what you want.

  • Command line only
  • Works out of Kicad: it edits the .kicad_pcb file
  • 3 automatic steps if your identical circuits share the same hierarchical file in the schematic. Otherwise, it allows manual editing of the intermediate files
    -Tested only under linux. Compiled files with gcc for linux 64 bits.

Feedback is welcome.

1 Like

You could always modify the .kicad_pcb file with a text editor, though I’m not sure if that is more or less work than redrawing the layout several times. It is more error-prone for sure. I’d try something like this:

  • Create “master” layout
  • Duplicate it to desired locations
  • modify the component reference designators to have the correct numbering
  • Close .kicad_pcb file in Kicad
  • Open .kicad_pcb file in text editor
  • modify track and via nets using the stil opened schematic as reference.

You could use the netlist import “dry run” feature to test for errors between schematic and actual net names.

Hi ikletti,

You could always modify the .kicad_pcb file with a text editor,

When you have 3 identical subcircuits with more than 50 components each, manually editing is not feasible. Not to mention when the similar subcircuits are more than 6.

There is no need to make any edition for the tracks and vias: just copy block works pretty well. The new tracks take their nets from the pads they are connected to.