Relink Symbol to Library

I suspect that this is answered somewhere but my search skills aren’t optimal today.

I cloned a KiCad project from a git repo, and the custom symbols now seem to be linked to a project-specific local cache file (in this case VolksEEG-cache). I believe this indicates that the link from a part to the “real” library is broken. When I open the part for editing, I get a warning “saving will update the schematic only”.

The custom library where these parts reside is in the git repo. I’d like to link the component symbols back to this custom library. Is there any way to do that?

1 Like

Simplest way is probably to just update to KiCad V6.
After you’ve opened the schematic once in KiCad V6 and saved it you can simply delete the [Project]-cache.lib file because that data is now saved in the schematic itself.

But that said, you are probably searching for Schematic Editor / Tools / Edit Symbol Library Links

Edit / Addition:
I cloned the project:

paul@cezanne:~/projects/kicad/zzz_Internet$ git clone https://github.com/VolksEEG/VolksEEG.git

… and opened it in KiCad V6 without problems. In: Schematic Editor / Preferences / Manage Symbol Libraries / Project Specific Libraries you see this project has a few project specific libraries:

The “${KIPRJMOD}” variable always points to the root of the current project and most parts are in the " ${KIPRJMOD}/Library/VolksEEG.lib" library. If that library is not present on your system, then you did not clone / copy the project properly.

1 Like

Hey thanks a ton!

It turns out that I’m working with a different project in that repo, VolksEEG\VolksEEG\hardware\DevBoard\DevBoard.kicad_pro

This one’s not acting as nicely. I made a video screen capture of what’s going on here, if you have a chance to take a look and tell me what I’m doing wrong.

1 Like

@00:00, I see you’re using KiCad V6 too. KiCad v6 behaves differently then KiCad V5 because it caches the schematic symbols in the schematic file itself. Once you saved your project in the KiCad V6 project, it’s mostly independent of external libraries.

@00:05 If you edit a schematic symbol directly from the schematic into the Schematic Symbol Editor, then you only edit (& modify) the coy of the schematic symbols that is on the schematic, and not the library symbol. That is all what the message @00:09 tells you. It is an informative message and not an error message. This is new for the Schematic Editor in KiCad V6, but it is very similar to how KiCad V5 already behaved for footprints on the PCB.

@00:27 You have an absolute path name for the libary name. I don’t know why…

Indeed, apparently there are (at least) two projects in that repository. The project you opened looks like just a simple test project for the feather and ADC.

In KiCad V6, if you load a schematic symbol from the schematic into the Symbol Editor, then you modify only that copy. If you want to modify the library symbol, then:

  1. Open Symbol Editor
  2. Load a symbol.
  3. Modify and save it.
  4. Go back to the Schematic Editor and File / Tools / Update Symbols from Library

Alternatively, you can also:

  1. Load a schematic symbol directly from the Schematic Editor into the Symbol Editor
  2. Modify the symbol.
  3. Symbol Editor / View / [v] Show Symbol Tree
  4. Save your modifications in the appropriate library.
  5. Possibly reload it again in the Schematic Editor

For me, the devboard project does not have a project specific library at all for schematic symbols, and for you I see an absolute path instead of use of the KIPRJMOD variable, which is a bit suspicious.

But in the end the project responds normally on my side, and you have a task ahead of you to learn and understand how library management works.

1 Like

Thanks! I’ll take a look tomorrow and see what I can see.

Library management in KiCad seems non-trivial. Do you happen to know of a good succinct explanation on the 'net somewhere?

1 Like

There is not much to it really.

The only change between KiCad V5 and V6 is that the [Project]-cache.lib file does not exist anymore in KiCad V6 and this information is now directly embedded in the schematic itself.

Working with schematic symbol libraries in KiCad V6 works now the same way as working with footprint libraries (Both in KiCad V5 and V6, it has not changed (much?)).

1 Like

Hey thanks!!! I think I get it now - basically this is working as it should in KiCad 6. Keeping the symbol in the schematic is actually a very good thing, I think, I’m glad that’s now the case. I just thought that it was an error because of that informational message.

1 Like

Looks like you’ve gotten it. I would have described it as the *-cache library was a kludge done until the schematic file format could be updated (what happened from v5 to v6) to protect the design from library changes. In the bad old days before the *-cache library if you changed a symbol in the libraries any project that used that symbol the schematic could be broken. Also if a design was shared in the bad old days, the schematic could be broken if the receiver didn’t have the same libraries as the originator.

1 Like

The biggest kludge (the [Project]-cache.lib file) as been fixed, but only quite recently with the introduction of KiCad V6. But there are still some remnants left. For example, in the PCB Editor you can export all used footprints to a library, but a similar funcion has not been implemented (yet) for the schematic editor, and for now you have do load modified symbols one by one in the Symbol Editor (which doubles up as the library management tool) and then save changes to a library. It’s not ideal, but it’s usable enough that after having done it a few times you almost forget there should be a better way.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.