The schematic editor (KiCad project and Eeschema standalone) always defaults to a certain page layout. This layout is not editable in any way (it seems to be hardcoded), which means editing the /usr/share/kicad/template/pagelayout_default.kicad_wks file brings zero success.
Using the “Page layout description file” field in EEschema is also useless, as it only works on the current open schematic, and will be ignored on opening the .sch file anew.
There is no way to set a default page layout.
In the KiCAD “Page layout editor”: same thing. It will work in the current project, but any new start of KiCad will bring up the hardcoded default page.
I have two questions:
1: is there an “officially tested and approved” way of setting the default page layout? Until now I’ve found none in any search or documentation.
2: I’ve found my own way of solving this problem, but no documentation or searches have told me that it’s OK. Can someone from the KiCAD team confirm my solution?
This is my solution:
Append the following lines to /usr/share/kicad/template/kicad.pro
This will make KiCAD and Eeschema read the stored layout file instead of the hardcoded one. Works perfectly, but as it is undocumented (and thus unsupported), I’ve no idea what will happen after the next upgrade
Thank You both.
But you’re missing the point: I’m not talking about templates. I have those and they’re completely useless to me (Arduino, Beaglebone, whatever) and I ignore them. They’re defined in directories with a “meta” subdirectory with a .html file and, and, and.
I’m one level lower: a simple schematic layout sheet, in which I want the lower right corner to be to my liking as default.
That’s in KiCAD not “template”, but “page layout”. And it doesn’t work as it should.
My apologies for imagining that this is a kind of “official” KiCAD site.
I could always reflect that back on you. What @BlackCoffee seems to be describing is a template that is just your preferred defaults (including a custom worksheet file). So when starting a new project instead of selecting “New/Project…” and then modifying the OEM defaults, you select “New/Project from Template…” and select the template that you’ve already set up with YOUR defaults.
Using the Layout tool, I hacked up the default to suit me and saved it as mySchematic Template. I created a new PCB with my pref’s/etc and saved it as my Base…etc template. Added the Icon/Meta stuff and placed them into myTemplates folder…
A clarification: Though I saved the first as mySchematic… It’s just a template Worksheet used by Both the Schematic and the PCB’s sheet. Probably should rename them…
@BlackCoffee, your suggestions are indeed helpful, but to me total overkill.
I’m basically only interested in using Eeschema standalone, thus my question.
Building a complete KiCAD template from scratch (which seems to the be only official way to go?) without any examples (why is an “example template” not available, just a load of “Arduino”, “STM32” this and that?) is a project in itself, which I do not need right now.
It’s certainly a steep learning curve getting into KiCad.
But OK, I have a working (though undocumented and not officially supported) solution to my immediate issue.
Let’s leave it at that. Thank You for your replies.
I think the idea was to not be forced to do this for each schematic, but only once in some general settings for all future schematics.
In the next upgrade that kicad.pro file will be overwritten and you have to edit it again.
There just might be a place in your personal config where this kicad.pro is looked for, but I don’t know.
In any case this works only as long as you are the only user of those schematic files and use them on the same machine. Because the worksheet file is external to the schematic, it should be the same for all installations. That’s why a project and a template is good: you save the worksheet into the template project, start a new project from the template, and the worksheet goes with the schematic. (As was already said, templates are not only for half-made boards, they are good also for small settings tweaks and empty projects.)
Whether this is a good or a bad thing, I can’t say. Maybe it would be better if the worksheet could be embedded into the schematic. You could file an issue to the gitlab issue database if you want to.
He seems to grasp the question. I open Eeschema (standalone) and yes it would be nice if it opened to my custom page layout but for me it is only a quick 6 mouse clicks to have my layout on screen. Never started a project or designed a board. Would be nice but not critical when the developers have many higher priority issues to work on. Wonderful program.
I’m returning here as the OP (although I left the thread earlier), as this subject seems to have raised some interest.
To me, there a basic flaw in the Page Layout handling in Eeschema (and also in KiCAD generally).
To me, the logic should be:
1: does a user-defined default page layout exist and is it known to Eeschema/KiCAD?
2: if yes, use it as default for the new schematic/project and modify as needed.
3: if no, use the hard coded page layout and modify as needed.
4: store the page layout with the design files.
But the current implementation directly slams you with the hard coded layout right from the start, and you’re forced to manually redefine the “Page layout description file” field in “Page Settings” every time, just to see that opening the design file later on will revert to the hard coded page layout. Wasted time, work and effort.
My (unsupported, undocumented) implementation using “PageLayoutDescrFile=” in the kicad.pro file improves the situation a lot, but I’m still presented with the hard coded page layout file when starting, and have to select “New” every time to get my layout loaded.