Set same layout for all hierarchical sheets



I’m using hierarchical sheets in my project (lets say that I’ve got 10 copies of one hierarchical sheet), now after reading netlist in PCBNew I have to place all elements separately (at least I’m not aware of technique that helps whit that in any way). I’m wondering if it is possible to read positions of all elements from ‘first’ hierarchical sheet, and set automatically elements of other sheet copies in the same order as the first one (optionally including traces between elements).


I made a program for self-use for this purpose.

Tested only under linux. Command line.
Tracks can be duplicated with copy block.


Thanks! it’s exactly something that I need.
I fork it to hold reference, but still, something similar can be achieved using python script, any attempts on that?


I would like to add this feature to the kicad code, but there are 2 drawbacks: my lack of good enough C++ knowledge and my lack of time to dive into the code, though I have made some progress here.

Programming a python script should be as easy/hard as programming a C++ function, in my opinion.

See that my program is not integrated into eeschema/pcbnew, it takes some information from .sch files and modifies the .kicad_pcb file outside kicad. It’s been years programming C based microcontrollers, dealing with text is not my fit…


Any news on this topic? I can try to compile the C program and figure out how to use it, but would be nice if it is a function in KiCad, and including the routed traces.


See @MitjaN’s replicate layout plugin here:

Note, you will need to upgrade to KiCad 5 if you haven’t already.


I have script python doing exactly 10 channels (or many more) like that for my design. If action_plugins not works for you let me know. I will try to work out detail how to share this script without complicit of interest! Or may be privately share with you.


Thanks, the Kicad_action_plugins are very nice! And I like the swap-pins plugin in the repository, I really missed this from Eagle and needed it for my current project. Looks like this now: