Library Management HeLL

I think that this confusion is amplified by the recent proliferation of commercial EDA library generation companies (SnapEDA, UltraLibrarian, and friends).

KiCad does not have a format for passing around a single symbol by itself (unlike footprints) – symbols have to be contained within a library. But these services give you components one symbol at a time. So they all generate a library that contains one symbol inside it, and name the library the name of the symbol.

This is of course terrible practice as a way of managing a collection of symbols, but I can understand why people think that it is the way to go, when they can just download such single-symbol libraries from a Digi-Key product page.

1 Like

Well maybe there should be a bit more thought put into the way the GUI of library items are managed. I mean it shouldn’t be so hard to move symbols from one library to another. One should probably be able to drag and drop things around.

2 Likes

It is really not that hard in my opinion. You can either copy/paste, or use “Save As”. You can’t drag-and-drop, but is the absence of drag-and-drop really “that hard”?

As others have written here, it really is time to read the manual and really learn how library management works.

In KiCad, a library for symbols is a single file which can contain many different symbols. Each library (not the symbols) have to be added to the library table to be visible in KiCad, and that is not what you have done. It looks like you exported or saved individual symbols into files.

(With footprints it works differently in KiCad. A footprint library is a directory, and each individual footprint is a file in that directory).

Another part of your confusion is that you can easily load a symbol directly from a schematic into the symbol editor, and then save the changed symbol into the schematic again. Such a modified symbol is stored in the schematic only, and when you update the symbol from the library, it is replaced again by the old / unmodified version, and your efforts have been lost.

So again. Take some time to read the manuals, do some experiments with dummy symbols and continue doing this until you understand how it works. After that you have the knowledge to re-organize your libraries properly.

3 Likes

Is it hard? No, but tedious. How about allowing you to multiselect multiple items at a time.

Imagine if managing files on your computer were as cumbersome. So currently it works… yeah but is very far away form easy to use. I mean similar things happens when you want to see what symbol inherits from where etc etc.

The GUI at the moment is the least that could work. There is lot that should be improved. Its no wonder people would prefer to manipulate files.

1 Like

You can. From a single library to another single library. Use copy/paste.

Yes but this does not help people who have a 10’s of different single item libraries. Why not allow me to copy form multiple libraries. Perhaps commandline?

Why would you have 10’s of different single item libraries? This will only cause Repetitive Strain Injury on the scroll wheel finger.

Libraries may start with a single item, but, over time, additions will be made. What is the point of a different library for each semiconductor or capacitor etc.

when you download ready made symbols from vendor sites you always get a one item libraries, as has been established in this thread.

I’m not saying the software is defective I’m saying it does not reflect realities on ground. Not really an issue for me I don’t download library items but my students do and they frequently have 30 one item libraries.

This will only cause Repetitive Strain Injury on the scroll wheel finger.

Exactly, that’s what I am trying to avoid. My point is the GUI is not entirely optimal should be improved. There is no reason why there needs to be this kind of limitation. There is no reason why i couldn’t consolidate 10 from this lib 2 form this lib, and 1 form there 3 lines with one drag or click or something.

1 Like

Hmmm, I’ve never downloaded a symbol or footprint. Give me 5 minutes to try.

In the Symbol Editor I can select multiple symbols in different libraries ( One mouse click and a [Shift + mouse click]), but if I then attempt to copy it, I get: Error loading symbol from library: ‘0_motor_driver’. symbol not found

I guess this is a bug and KiCad is attempting to “copy” the library itself as being a symbol too or something similar. (Edit: Ah, yes, the good old [Ctrl + click] to select only a few items (See jmk’s followup post))

The Footprint Editor does not even let me select more then one footprint at a time, so no copy of multiple footprints.

There is … room for improvement here :slight_smile:

1 Like

I couldn’t find any sites that didn’t require a sign in, so give up.

@paulvdh
When selecting multiple symbols from multiple libraries, you need to open all the libraries first and then take care to select only the symbols and NOT include the library.

ksnip_20240627-184456

I guess it may help a lot if Pinned Libraries have their own window. Currently they are only put on the top of the list. but if there was a separate scroll list for the pinned libraries, then this would reduce the scrolling a lot if you want to collect symbols from different libraries and put them in a pinned library. (Note this can also be temporary, it’s easy to un pin a library too).

At the moment, you can run multiple instances of KiCad, and each instance can have an open Symbol Editor. It is quite easy to make a KiCad project that you use only for library management. If you do this, it’s already easy to copy a symbol from the symbol editor in one instance, and paste it in the symbol editor in another KiCad instance. (I just tried, and it works).

Another improvement would be if a symbol can simple be dragged from one library to another. I mean, I can drag an image from a pixel editor to a post in this forum, so why not drag symbols to libraries in the same program?

I have not checked gitlab, maybe there are already feature requests for these things. Do you recon it’s worth making feature requests for these?

1 Like

You can also change the “nickname”; even in official Kicad libraries, on a temporary basis.

I don’t know if importing a symbol into a library from a third party download always creates a single item new library (maybe you could comment), BUT, I’d like to know why anyone would would have 10’s of these libraries.

Surely, occasionally, these single item libraries should be consolidated into reasonable libraries and if they haven’t, perhaps a large number to consolidate will teach the user to do this a bit more often.

I don’t think drag and drop is worth the effort as often (in my case, at least) I will edit the name of a symbol to my liking, which makes d & d silly.

Finally, why are these students of @joojala not modifying Kicad symbols and footprints or creating their own with the Symbol and Footprint Editors? I wouldn’t trust an imported symbol or footprint as far as I could throw it and I’m only hobby these days.

Don’t think too deeply / philosophically about that. It’s a situation of “Shit happens”. People inexperienced with KiCad may mistakes like that and having a method to fix such mistakes easier is a good thing for KiCad.

I think I just stumbled into a bug:
I just did:

  1. Open a KiCad project which as a project specific library.
  2. Open the Symbol Editor in that project.
  3. Make sure a writable library is selected, then: File / Import / Symbol
  4. Browse to some other KiCad Library, (I selected one with about 10 symbols in it.

Now KiCad just selects a (first, or random?) symbol from that other library (not in the library table), adds it to my own writable library and shows it in the editor. Apparently there is no way to select any of the other symbols from that external library to import it.

Geesss, this thread is hard.
First, I never import symbols or footprints.
Second, I never use project libraries. :frowning_face: :frowning_face: :frowning_face:

I’m off to dinner. I’ll think about creating a project library to confirm your findings later.

Here’s what I did in the symbol editor:

  1. Did New Library
  2. Made sure that it was selected
  3. Did Import Symbol
  4. Selected a file containing a single symbol that I had exported earlier (same procedure if downloaded)
  5. Imported fine and an asterisk after the name shows that it’s not saved yet.

At the moment there doesn’t seem to be a way to select more than one symbol for import. Also if the file selected happens to be a multi-symbol library, then only the first symbol is imported, there is no selection.

So whether this is done piecemeal or in one session, steps 2-5 have to be repeated for each symbol to build the library.

I can understand you regard this as tedious. I have considered writing a sort of zip like CLI utility where you can specify a symbol library (the “zip” file), and the symbols to merge to, delete in, or extract from, the library. It would have to do some error checking that there are no dupes, malformed symbols, etc. But as I don’t do many library operations, I didn’t take it further than a thought experiment.

I wonder if a hacky shell script could be written to combine lots of symbol files. Just generate a new kicad_symbol_lib line, then concatenate all the single symbol files with the first and last lines removed, then close the kicad_symbol_lib header with a closing right parenthesis.

So a new library is not created for every import if a location for the import is first selected?

DIdn’t try that, maybe it happens if the target doesn’t exist, but then I think it would ask you to select a library. I just wanted to make sure a blank library was selected.

Indeed. You have to select a writable library before you can import a symbol. If no (writable) library is selected, you just get an error message.

I have never imported a symbol into a footprint either :smirk:

Yes, if the library contains only one symbol (I guess) it gets imported correctly, but if the library has multiple symbols, there is no way to select which one you want to import. (See my previous post).