How to convert schematic format from eeschema version 5.1 to 6.0?

is there a way how to convert schematics from Kicad 5.1.7 to Kicad 6.0.4? If I try to load my old schematics like that:
eeschema my_schematic.schem

the schematic editor opens and displays a pop up dialog saying:
Error loading schematic: my_schematic.schem
Expecting ‘(’ in ‘my_schematic’, line 1, offset 1.

The contents of my old schematics starts with his line:
EESchema Schematic File Version 4

I created a test schematic file with the new version (6.0.4) and the first line is indeed different:
(kicad_sch (version 20211123) (generator eeschema)

So I believe the structure of the schematic file is different, hence my question - how do I convert the old schematic file to the new format?

My workflow only uses eeschema program, I did not use kicad as such, so I do not have relevant kicad projects etc. Not quite sure whether it matters. I run Linux version on Ubuntu 18.04.

You should be converting whole projects, not individual schematic files. Open the .pro file in v6 with kicad.

If I open the .pro file then the ‘project’ opens. When I click on the Schematic Editor icon the following pop-up dialogue appears:
Schematic ‘my_schematic.kicad_sch’ does not exist. Do you wish to create it? [Yes][No]

If I click [Yes] a window opens with a menu and completely gray contents. I can see a mouse coordinates x: y: being shown on the bottom status bar. It looks like the schematic editor is in some wrong state, basically it does not show the editing canvas. If I click [No] in the pop-up dialogue then the dialogue closes and nothing happens.

If I rename my schematic file and give it a .kicad_sch extension then the eeschema complains about the format of the file (as I wrote in my original question: Expecting ‘(’).
Any other ideas?

You should not have interfered with KiCad’s naming convention. In v5 opening the .pro file will make it look for a corresponding .sch file. So you should change back the name of the schematic file to .sch (not .kicad_sch, that’s the v6 name). After the conversion you will get a .kicad_sch file.

And the file extension isn’t “schem”, either, but “sch”.

That was it: Is I wrote, I never used kicad itself, I only use eeschema for drawing schematics, and I gave my files .schem extension (which was never an issue). Now I renamed the .schem to .sch and the conversion of the schematic file happened automatically when I opened it from the kicad project ‘launcher’.

1 Like

In future always start from the KiCad launcher except in certain usages. You may have noticed that in a new project if you create a schematic directly with eeschema, it also creates a project file anyway.

1 Like

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