Library Management HeLL

It’s been 5 years since I started using KiCad. Unfortunately, I’m still in library management hell. I’ve got a GIT file where I’ve consistently put my custom part designs. This file is further broken down into a symbols file and a footprints file. Over the past few years I’ve employed this setup and almost always have to learn how and why it works every time I use KiCad. Sometimes symbols don’t load and I have to point to this file again. Sometimes designs don’t save in the file.

Unsurprisingly, I’m confused again about library management, and my intuition isn’t getting me anywhere… I erroneously edited, and saved in the same place, a library part that was downloaded with my version KiCad 7. I think I’ve managed to create a separate symbol file and saved it where I think it should go. I can see it in my user file. I’ve spent the last half hour trying to figure out why the part I just edited, and have been trying to point to, will not show up when I hit “A”. I’ve also tried the Change Symbols option. I can locate the part, but it won’t let me click enter and load the new path in the New library identifier field. I can see the file path and file in the Preferences → Manage Symbol Libraries → Global Libraries Library Path.

Why am I so confused? I can’t be the only one that has gotten completely lost.

It turns out I’m even more confused than I thought. It looks like I’ve saved a part as a library? and I’ve overwritten a part that turned into a library? I don’t even know how this is possible.

Here’s the file I’ve modified. It is obviously in the KiCad supplied symbols directory.

I want to change it to CEM3340, which is the correct file in my user folder, but it won’t let me.

Here are the three files in my symbols folder.
image

Here are the files in my Symbol Libraries. What am I doing wrong?

Let’s start with this. If you use git, you certainly know what is a file and what isn’t. But what you say doesn’t make sense. Not from the viewpoint of git, nor from the viewpoint of KiCad, nor from the viewpoint of your computer’s file system.

In KiCad one symbol library is one file. One footprint library is one folder (directory).

So, please be exact and use correct words to minimize confusion.

1 Like

OK. I have a symbols folder and a footprints folder. CEM3340 is a file. I was using files and folder interchangeably. I guess that’s where I’m confused. I think of a library as a collection of books or files. KiCad calls one file a library?

My objective is to not use the symbols supplied by KiCad and to have my own in a separate folder that I can link to and modify. I’ve had trouble before where I try to load a project and there’s squares full of question marks everywhere.

A one symbol file is just a symbol library with one member. So all symbol files are also libraries.

Read this:

The FAQ section is your friend.

A one symbol file is just a symbol library with one member. So all symbol files are also libraries.

I understand this in theory, but get confused when actually trying to configure things neatly.
I want a folder for user files stored locally and occasionally pushed to GIT that has all of my user created symbols and footprints. I’d love to have everything stored away nicely with specific project folders for each project I’m working on, but I’ve never gotten that far or figured out how to link everything easily. The 8049 symbol is associated with another project. The CEM3340 and SSI2131 symbols are associated with my current project. SSI2131 should not be associated with 8049 pinout. I want to undo the damage I’ve done.

I already tried this, but it says the file already exists. I simply can’t access the symbol to change the path from Audio:AS3340 to my own library and path.

I’m still confused. Why would a file function like a directory or library? I’m trying to move up a directory to where all of these files are stored and post a simple link in my global libraries window. Unfortunately, it won’t let me. I remember, someone told me that I can’t change up to the parent directory symbols where all of these files are held and that I needed to create a link for ever file in the global libraries symbol libraries path?

Am I wasting everybody’s time? Sorry, but this system is one of the most painful software experiences I’ve ever had. Is it just me?

1 Like

From long ago a symbol library has been a single file, sort of like a zip file if you like. Now consider what you would do with a single symbol. You could give it a different file type, but KiCad decided to just make it a library with one member. This is the reality that any scheme that you devise has to deal with: A symbol library is stored in a single file.

Therefore you cannot apply OS level file operations on symbol libraries to do things like add a symbol, or merge a library into another (same thing since a single symbol is a library). You have to use KiCad’s symbol and symbol library management facilities.

You may use git to track your changes, but they would have to be at the level of symbol libraries.

2 Likes

Thanks! Do you have any suggested reading?

The KiCad docs would be the logical starting point.

2 Likes

You sound like I did some years ago. My solution was simple, I had to layout the folders and what is in them and keep it “laminated to my desk”

My structure is:

Another thing I found. In the global paths you must use the “shortcut” and not the full path.

2 Likes

Yes.

I wrote this in a similar thread yesterday.
I also wrote this FAQ.
There is also this official Kicad tutorial.

My advise is to temporarily forget GIT.
Learn to create and use personal libraries with your computer first. When you have mastered this, move to GIT.

Basically, to organize personal libraries, as mentioned in all the above links, you:

1/ Create a Folder with your Operating System, NOT Kicad.
2/ Create more Folders with your Operating System, to place in your original Folder.
3/ Maybe create even more Folders to place in your Folders in your Folders in your Folder; again with your Operating System.
4/ THEN you open Kicad, go to the Symbol/Footprint Editors and use File > New Library > Global > give the new Library a name and steer to the folder (created with your OS in 2/ or 3/ ) in which you wish the library to reside, then click Save.
5/ Repeat 4/ as required. Personally, I have 25 symbol libraries. @Piotr has 26… he beats me :frowning_face:
6/ Use the same procedure (4/ & 5/ ) to create footprint libraries.
7/ 3D libraries are not created with Kicad. 3D libraries are created with your OS. They are another set of named folders in one of the other folders created with your OS.

Copy, Import and Create symbols or footprints or 3D images and place them in their appropriate libraries.

Your tree should end up looking something like this:

*My Kicad Libraries 

           > *My Schematic Libraries > Various named Libraries > Symbols
                             
           > *My Footprint Libraries    > Various named Libraries > Footprints
                             
           > *My 3D Images  >  *Various named Libraries > Images
NOTE: everything with a * is created with your OS.                                                       

When you have all the above sorted and correct and understood, it is time to move it all to GIT.

Please ask any questions if you do not understand something in this post.

1 Like

The concept of a library that includes a single item is counter-intuitive. The inconsistent organization of symbols (one per kicad_sym file) vs footprints (many per directory) is another source of confusion.

2 Likes

As already explained above practically all symbol libraries hold multiple symbols in the .kicad_sym file. It’s just that the same library format can be used to hold only one item, when handling symbols one at a time.