How to create multiple unit symbols with scripts (such as Python scripts) in KiCad?

We want to create the following multiple unit symbol with script. Are there any scripts to create multiple unit symbol for reference?

A substantial part of KiCad’s own libraries are generated from scripts.
For example, if you put a Connector_Generic:Conn_01x06 on your schematic, then the description of the symbol states: Generic connector, single row, 01x06, script generated (kicad-library-utils/schlib/autogen/connector/)

I also quite liked SKiDL. SKiDL is a python library that makes (made?) it possible to completely replace a schematic with a python script. It was easy to for example declare a LED object, assign a footprint, and then create a two dimensional array of those LED’s in a few loops. It is a sort VHDL / Verilog for Schematic design in Python. I never used it myself, because it is not a good fit for the sort of things I do, but for big systems with big buses it may be a good option. I am not sure if SKiDL is still maintained. It’s been years (and several KiCad versions) since I last looked at it.

There are also some projects / scripts to generate schematic symbols from spreadsheet data. One such examples is uConfig. Also see: Creating KiCad Parts From A PDF Automagically | Hackaday

I am also not sure of the state of that utility. It is common that the creator looses interest in such a project after a few years, and then bitrot sets in. With the transition to KiCad V6 there was a complete overhaul of the schematic format, and other file formats (such as symbol libraries) also change with sometimes with newer KiCad versions.

You can find information on KiCad’s file formats on:

kipart will create multi-unit parts from a list of part pins in a CSV or spreadsheet file. The libraries it generates are for KiCad V5, but later versions of KiCad can convert them to their representations.

Thank you both of you, @paulvdh @devbisme
I would like to have a try.

With KiPart, we’ve created a three-unit symbol (TE0745 symbol, TE0745 is one of the Trenz Electronics’ products.). It’s very handy. Thank you, @devbisme. It still took me a full half a day to get the symbol done. I’d like to contribute to the official symbol library if it is possible.

Meanwhile, we already have the footprint of one of the three-unit symbol (SS5-80).

The problem is how to create the footprint of the above new created TE0745 symbol based on the existing SS5-80 footprint?Are there any convenient tricks for this task? Our target TE0745 footprint looks like the following sceenshot. We want to make the three SS5-80 with four pads a combined footprint.

In the footprint editor, all parts (pads, lines, holes, etc) are just separate items. You can make a copy of the samtec connector footprint, then copy all the parts and paste it twice for the other instances. Then renumber the pads with Footprint Editor / Edit / Renumber Pads (Doing it with a numbering step of 2 and then repeating for odd and even rows is the easiest I guess).

OK, I’ve gotten the idea. Thanks. @paulvdh

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.