Let me state outright I have a lot of problems with libraries in both the schematic and pcb editors, so there may be some underlying issue here. However today I opened a schematic from a few years ago to use as a basis for a new similar product, and I find most of my own schematic symbols have gone (this happens quite a bit, to varying degrees). Normally when this happens I open an old schematic, copy the symbol from that, and paste it into a new library component and it all works. However now I seem to be just pasting text - not a library symbol.
If you have custom libraries and you don’t maintain them in the same relative folder locations as they were originally back when you used them then KiCad is going to struggle to find them . . .
Assuming they are still where they should be, are you telling your new version of KiCad about them ?
You write you have “a lot of problems with libraries”, but you also write you copy symbols from a schematic and paste them in another schematic. This implies you do not use libraries at all. A schematic is not a library.
What do you mean with:
How old was the schematic? KiCad V5 and older do not store the graphics of symbols in the schematic file and they rely on libraries in external files to be able to even show the symbols properly. If those libraries are missing, the symbols look like two question marks inside square brackets: [??].
You’re not copying / pasting a “library” symbol, but a symbol from a schematic, as I wrote earlier. For the rest, KiCad has always used text in the background for copy and paste operations. To verify this yourself, you can copy something from KiCad, and then paste it in a text editor.
The obvious answer is to start using libraries, and you have to learn some library management first. You can: Schematic Editor / File / Export / Symbols to new Library and from there you can use the Symbol Editor for more maintenance on the libraries you created. KiCad also does not search for libraries, so you have to learn the difference between project specific libraries and global libraries.
I have started to use KiCad from defining my own libraries and since V4 till V8 never noticed any problem with them.
I think source of problems with libraries is that each new KiCad major version number release comes with libraries in new location and when older version project is opened it contains symbols/footprints that come from old library that already not exists or at least is not in current library list.
I don’t know what is elegant way of solving it. Fortunately I don’t have to know it.
I have described my KiCad files and libraries organization here:
All my schematic symbol and footprint libraries live in the same directory they always have on my data drive. When I install Kicad I just accept the defaults - not sure what else I could be doing instead to tell Kicad where they are.
I copy them from an old schematic and paste them into a new component in the symbol editor.
The PCB was last edited in October 2023. I usually look forward to updates and generally keep on top of them, so I probably used what was current at the time.
Its OK I’ll just re-create them - they dont take too long. Its just annoying thats all.
You need to tell KiCad where to find your custom libraries . . . otherwise how can you use them in new projects ? how do you browse to a custom Symbol to use it in a schematic ?
You do this from here:
Add your custom Symbol libraries and custom Footprint libraries.
I may have done what you suggest in the past - it rings a bell.
In general the parts are there when I need them - I just pick it from the Place → Symbol menu in the category “Davids Symbols”. I’ve done probably a hundred PCBs (including revisions) using Kicad - this seems to happen sometimes, but I cant tell you when. On the plus side I’d say for the most part it all works as I need.
I think the root of the problem is it was a “legacy” library. I guess that means it’s a format that’s partially or completely unsupported in 9.0.2. Today I retrieved the part I needed by opening an old project and importing the “rescue” library into a new symbol library. Fingers crossed that works for any other part problems I have.
Looking forward to 9.0.3 - I always like new versions. Thanks for your help.
What I remember when major version number increases the key for library was the first run of schematic and PCB. They asked for library lists and I had a small problem as the window opened to select file with library list didn’t show the hidden/system directories (Windows). I had to copy my library list files to some other directory and then select them at first run.
It was the same when I moved to V5, V6, V7 and V8.
My library files aren’t in one of those directories that Windows is in control of, and subsequently hides the full path. Mine are on a separate platter drive (D) that’s not hidden or in any way obfuscated. Should be no problem I think, as the path never changes.
It sounds as if you are making a potential future issue for yourself . . . how many of these rescue libraries do you have with the same custom symbol or footprint in it ? which one is correct ? have any been updated ? what kind of version control do you use for your symbols and footprints ?
I’m not sure I understand. I generally dont need to modify parts I have created. Not because I’m super smart or anything, but because they’re not that hard to get right for the parts I use. Maybe if I used 1000 pin CPUs, but I dont. So there only needs to be one custom symbol library that gets backed up.
Footprints are a bit different but I dont make too many of those either. More than symbols but not that many more - one of the things I like about Kicad is that it has such an extensive library, I dont have to spend time making library parts, I can get on and do the real job of designing the PCB.
The point is this; if you have several libraries (rescue or otherwise) with the same symbol or footprint how do you know which one is the correct one ? if you have no way of ensuring that you only have one valid copy you have no idea if the one you have used is the correct one or not. This is why version control exists . . . it’s applicable in all walks of engineering, be it software, electronics, mechanical, etc.
Imagine this; you have a footprint that you have used in several current projects and you discover a small error, not enough to cause an issue but you want to fix it. If all projects reference that one single version of that one footprint you simply need to fix that one footprint and update all your projects to pull the updated version. Then go one step further and apply formal version control to the footprint and all this change information can be logged and is reversible if needed.
I miss understood you from far beginning. I thought that you are writing about library problems you have from time to time since years and not with V9 only.
I’m still in V8 so can’t say anything about V9.
I just did a little experiment in KiCad V8.0.9. Copy from the Schematic Editor, and paste in the Symbol Editor did not work (The pasted symbol ends up as text). And the same for the other way around. When pasting you do not see the graphical objects, but only the text. Copy & Paste does work when you stay within the same editor. Copy & Paste also works in between two instances of the schematic editor, or in between two instances of the symbol editor.
So KiCad V9 and V8 seem to behave the same. I don’t know if copying between the schematic and the symbol editor was ever supposed to work, or whether that was a happy coincidence in older KiCad versions.
But there is no need to:
KiCad is pretty good at maintaining compatibility with older file formats, at least as far back as KiCad V4. Old libraries and schematics can be used, and also old footprints or PCB’s can be opened, and you can exchange parts either between different instances of the same sub program, or via the normal library management.
I think it’s fairly obvious that the current V8/9 behavior is broken - nobody would ever want to paste a copied symbol as s-expr text. Hopefully it will be fixed at some point (if it hasn’t already been in nightly).
However, can you not just edit the symbol from the schematic (CTRL-E), and then save into a library?
No, that is not so obvious to me. The way symbols are treated in the schematic editor and in the symbol editor are quite different, and I’m not sure whether Copy & Paste between those editors has ever worked or was ever supposed to work.
Yes, that is one of the normal workflows for library management and that should all work.
The fix may be as simple as disabling paste in the symbol editor, but the current behavior is definitely broken. Spewing the internal data format into a text field makes zero sense.