Globally assign a footprint to multiple symbols

I hereby certify that I am not simply asking someone else to design a footprint for me.

I have a large library of resistors, capacitors all with part numbers and data sheet links etc. I would like to be able to select (for example) all the 0603 resistors and assign a default footprint from the standard Kicad footprints. Currently my large library does not have any default footprints.

Obviously I can do this one part at a time but that would be very slow :slight_smile:

TIA

questions:

  • which kicad version?
  • where do you want to apply the changed footprint:
    • in the symbol library? (to assign a default footprint to the symbol?)
    • in theschematic editor after you have drawn the schematic and already placed all your symbols?

sorry Kicad 8.02. In the symbol library
thanks

What I’d do is to do one of the resistors. Than open the symbol library in a decent text editor like VS Code and perform a global search and replace to copy the footprint parts of the the good one to all the others.

There is no built in solution to manipulate the libraries with a table/spreadsheet view.
so your options are:

thanks for the suggestions. Bulk field editing would be really good.

A quite different approach is to switch to the database driven library system that KiCad also supports. You would have to put all the info into the database once, but after that you can manipulate it in powerful ways.


You can use a text editor with Search & replace as bask185 mentions, but this can be done a bit more … fundamental. KiCad’s symbol libraries are written in S-expression format, and this is a standardized format, and there are libraries available to read such files into memory for many programming and scripting languages. With help of such a library, you probably need 5 or so lines of code to load the library. then write a loop to iterate and replace some fields, and write data to a file again.


Or write some small scripts to convert it to and from a spreadsheet form/

Probably not helpful information…
In KiCad V4 I have defined all 0603 resistors as being aliases to one having footprint assigned.
When moved V5->V6 it was automagically changed into all 0603 resistors being derived from one. So they have common symbol but can have separate other fields. I don’t know if footprint is also taken from resistor from which current resistor is derived or it was copied to all of them (can’t check it now).