Skip to content

Fixes issue #417 - Open .kicad_sch subcircuit schematics in Edit Subcircuit#607

Open
dharunashokkumar wants to merge 1 commit into
FOSSEE:masterfrom
dharunashokkumar:fix/issue-417-edit-subcircuit-kicad-sch
Open

Fixes issue #417 - Open .kicad_sch subcircuit schematics in Edit Subcircuit#607
dharunashokkumar wants to merge 1 commit into
FOSSEE:masterfrom
dharunashokkumar:fix/issue-417-edit-subcircuit-kicad-sch

Conversation

@dharunashokkumar

Copy link
Copy Markdown

Fixes #417

problem: In eSim 2.5, KiCad 6 saves subcircuit schematics as .kicad_sch, but "Edit Subcircuit" always launches eeschema with a hardcoded .sch path. Since that file doesn't exist, eeschema keeps prompting to create a new schematic instead of opening the existing one.

Fix:

  • openSub.py — open the .kicad_sch file when it exists, fall back to legacy .sch otherwise (same pattern Kicad.py uses for the main project schematic). The fallback matters because the shipped SubcircuitLibrary still has ~950 legacy .sch files alongside the newer .kicad_sch ones.
  • newSub.py — new subcircuits are now created as .kicad_sch directly, consistent with how newProject.py creates project schematics.

Tested both paths locally: a KiCad 6 subcircuit (e.g. 2x1_mux from the library) now opens correctly, legacy .sch subcircuits still open, and cancelling the folder dialog does nothing as before.

…t Subcircuit

Edit Subcircuit always launched eeschema with a hardcoded .sch path.
Subcircuits saved with KiCad 6 use the .kicad_sch extension, so
eeschema was pointed at a file that does not exist and kept prompting
to create a new schematic instead of opening the existing one.

Pick the .kicad_sch file when it exists and fall back to the legacy
.sch file otherwise, the same way Kicad.py opens the main project
schematic. New subcircuits are now created as .kicad_sch directly,
in line with the project schematics from newProject.py.
@dharunashokkumar

Copy link
Copy Markdown
Author
1-esim-edit-subcircuit-opens-kicad_sch 2-eeschema-2x1_mux-kicad_sch Tested on Windows 11 with KiCad 6.0.11 — Edit Subcircuit now opens the existing .kicad_sch straight away. Here it's opening the 2x1_mux subcircuit from the library; on master these same steps prompt you to create a new .sch instead.

@dharunashokkumar dharunashokkumar changed the title Fixes issue #417 - Open .kicad_sch subcircuit schematics in Edit Subc… Fixes issue #417 - Open .kicad_sch subcircuit schematics in Edit Subcircuit Jul 15, 2026
@dharunashokkumar

dharunashokkumar commented Jul 15, 2026

Copy link
Copy Markdown
Author

And also Fixes #274

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Subcircuit file saved as .kicad_sch in eSim 2.5 (KiCad 6) not recognized by "Edit Subcircuit" option

1 participant