Searching the libraries

Hi All,

  1. Is there a way for me to determine whether any footprints for the standard package SOT-223 (just to give an example that’s keeping me busy right now) are available in the libraries, other than open the “Library Browser” and painstakingly inspect the contents of each of the roughly 80 libraries / menu items shown on the left hand side menu shown? I’m OK with using the command line for searching plaintext file contents and so on, but I’ve given that a try and no joy (used find and grep at /usr/share/kicad/library/).

  2. Clicking on many of those ~80 menu items results in “error reading zip local header”, is that normal? The error shows in the Eeschema window, the Library Browser just freezes until the error popup window is cleared.

Cheers,

Alex

Yes.

I found CvPcb can do this, with some small caveats that need helpers…

See attached image, of a Lib search by both PinCount and SubString.

CvPcb does filter by PinN, but sadly not yet as a user value. You can seed this from the SCH, so I make a special SCH called
KiCad_Lib_Search_Framework.sch,
which has connectors with (eg) 1 thru 16 pins.
(If you have something with PCB mounting holes, the mapping is less useful & user value would be good.)

CvPCB also lacks any Copy of the shown filtered Lib choices, but it otherwise gets close.

If you have a eeschema drawing, that already has correct pin-counts, this will assign directly with a double-click + Save.
You can then find that part in SCH, use ‘E’ to query and select/copy the footprint string.

1 Like

Fantastic, thanks. I had wrongly assumed that the one tool for that sort of task would be the library browser. In fact, I don’t quite understand the reason for having two different tools with so similar purposes.

Cheers,

Alex

I think that is historic and the fact one is in SCH and one in PCB.
The SCH one is focused for mapping, the PCB one more for editing.

I’ve suggested an enhancement to CvPcb, to add the simple improvements of

  • User define of Pin Count, or Pin Count range
  • User copy of the selected Long Library Footprint Name, to Clipboard.
2 Likes

Well, I’m very new to all this, but so far I run both from my schematics, so they are both identical in that respect.

Basically, from my schematics, I use either to make sure that my symbols point to correct footprints so that, when I generate the netlist that I will be importing into PCBnew later, it’s got correct footprint information in it.

The way I run the library browser is by right clicking on a schematics symbol, selecting edit component -> footprint. The way I run CvPcb is by clicking on its icon in some icon bar I have at the top of the screen.

Soon enough I will need to start creating my own footprints (in fact I already need one), maybe then I’ll find that library browser operations are best dealt with from PCBnew than Eeschema, but I don’t see how right now, in fact I didn’t know you could run that from there.

Cheers,

Alex

Yes, there is a button in SCH, but I was meaning the Footprint-access code comes from the PCB side of development, so it will naturally have ‘PCB-like’ thinking and GUI applied.

In PCB side, when you Select.E.ChangeFootprint, then ListFootprints allows substring (eg 223 finds SOT-223) & SOIC reduces to just over a dozen.
I see this search does not include pin count filtering,

Oh, I now understand what you mean, fair enough :slight_smile:

Thanks!