Kicad V5 import V4 sch - automatically assign library table

Hi
While test-driving the V5 on a separate machine, I’ve tried to open a copy of my 4.0.7 design (SCH+PCB).
What I have noticed, is that upon first start of EESCHEMA Kicad suggests automatic attempt of symbols assignment. In my case it leads to using references to project cache, which I’d like to avoid. Instead I’d like it to try to find proper reference in specific library e.g. where symbol R was used I’d like it to find the symbol in Device:R where it actually exist. Most components except for simple ones I keep in my own lib so it should be easy to automatically change from PartX to mylib:PartX . Is there any way to achieve that?
I know that I can use manual tool Tools > Edit Symbol Library References , but I think it should be doable to auto-find proper library reference for old projects.

Hello,

I have the same issue. We have our own libraries in KiCad 4.0.7 and schematics using them. Opening the schematics in KiCad 5.0.1 we loose all the references to our own libraries and all the symbols are rescued. Is there a way to keep the reference to our own library? I even tried to copy the own libraries to the new location so KiCad has a chance to see that these still exists

In 4.0.7 once the symbol is placed in the schematic, the link to the library is lost if I recall right.
The name of the part is PartX. In v5 the name of the part in the schematic is mylib:PartX.

I think there is no automatic process to find out which symbol belongs to which library. In the automatic process all we have is a new library called rescue with all the symbols of the project.

1 Like

It shouldn’t be so hard to rempap ComponentX to LibraryX:ComponentX assuming ComponentX is an unique name (at least across assigned libraries). This would greatly help importing old projects into new KiCad which to my brief experience brings lots of goods compared to 4.0.7 (esp. improved OpenGL canvas in PCBNew - much less need to fallback to Legacy, if any).

This is what the remap process does. If you provide the same libs to version 5 as you have for version 4 then it works.
If you used stuff from the official lib be aware that we had a major reorganization. For this reason kicad will not be able to find these symbols in the new lib setup. So in such cases it might pay to have a second library setup that holds the version 4 official lib.

Any assignments that you want to manually fix after the remap process can easily be fixed with the dialog found under “tools -> edit symbol library references”.

So my workflow is as follows:

  • during the remap process accept everything with default options. (this means a lot of symbols will be rescued)
  • After remapping i edit the library references one symbol at a time. (Only for simple symbols like Resistors or connectors. Complex symbols are too dangerous as there might be subtle changes that can break the PCB) Run ERC and check if everything is still ok.
  • After all of that i switch over to pcb new. Use update pcb from schematic. I only accept the changes if this tool does not list any changes! (If there are changes then one of the symbols changed in a pcb breaking manner.)

So seems like I do something wrong here.
First of all, most symbols are from my library (only for trivial stuff like RLC, GND I use Kicad’s libs).
I have my library available in 5.0.1. If I want to use a component from my lib, I can enter mylib:mypart and it is there.
However if I open a 4.0.7 project which uses “mypart” symbol (from the “mylib” library), automatic import assigns the Rescue symbol instead which I’d prefer to avoid. I’ve even tried to remove symbol cache to force Kicad to search through libraries, to no avail.

So either I’m doing things in wrong order, or I do miss some important step. As the 5.0 setup is on my spare machine, I don’t have access to it now, but can post my step-by-step procedure later on.

This is point 1 of Rene_Poschl answer.
In point 2 he says he edits the library references one symbol at a time. I guess he means manually editing the reference.

As you use your own libraries, don’t wory about complex symbols because they were not changed.

Maybe is worth editing the .sch file with a text editor.

The step 2 and below should only be necessary for the symbols taken from the official lib. I guess i forgot a step 0. One needs to add personal libs to the sym-lib-table before running remap. (Either to the project local lib table or to the global table.)

To do this one would need to open the symbol library editor -> preferences -> library manager. (The reason one would need to do this in the lib editor is such that the remap process does not start before the libs are correctly setup.)


I noticed that KiCad adds project local libs automatically during the remap process. This however only works if there does not exist a sym-lib-table already. (Pre version 5 nightly builds added empty sym-lib-tables for quite some time. So this might explain why OP has problems with this process.)
Another requirement is that the libs did not move at all within the file system.

So my procedure is as follows:

  1. launch KiCad 5.0.1
  2. Open 4.0.7 project
  3. Launch Symbol library editor to load libraries
    3a) Go into manager to veryfy myLib is listed on Global libraries tab
  4. Double click Schematic file
    A warning window is displayed, explaining the Schematic is using old style library list lookup for symbols, and suggests to Remap symbols
  5. I click Remap Symbols button
  6. Project rescue helper window displayes with an information
    "This schematic was made using older symbol libraries which may break the schematic. Some symbols may need to be linked to a different symbol name. Some symbols may need to be “rescued” into a new library.
    And there’s a list of all schematics’ symbols, and action “Rescue symbol found only in cache library”
    which is not true, as when the schematic opens, I can add a new symbol, and exactly the same symbol name exists as myLib:myComponent.
    So why the Rescue utility cannot find my sybmbols in the library, and instead uses their cached Rescue copy? Any hints?

During remap, kicad checks if it can find the symbol in the libs provided in the kicad version 4 projects lookup list. (This is part of the .pro file and also of the .sch file header) If not then the symbol will need to be rescued.
If it can find it in the old version 4 libs, then it checks if it can find the same lib in version 5. If not then the symbol needs rescuing.
This means you need to have the same library (In the same absolute file system path) and symbol names as you had when creating your project with version 4. Otherwise kicad will decide it needs to rescue your projects symbols.

Symbols are also rescued if the one in the lib is different to the one in the cache lib.

There also seems to be problems if you used some particular versions of the pre version 5 nightlies to create your schematic.

1 Like

OK, thanks for your explanation. That “absolute FS path” might be a clue, since I’ve copied the project to my spare machine for 5.0 test-drive, so the files are there, but they aren’t in the same path. Will try to hand-modify paths to allow new KiCad to find the lib where it expects it to be.

Confirm problem solved - thanks @Rene_Poschl
The key was to keep the path to the custom library file.
I took slightly different route and edited the .pro file to point to file using new location.
Then launch the Remap function and my symbols are now pointing to proper library entries in the form myLib:myComponent

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