How to edit the schematic templates - the lower right corner? - Page 1
Forum section: electronics / general

author: Benta
author_rank: Super Contributor
timestamp: August 06, 2020, 09:55:33 pm
content: I'm new to KiCAD/Eeschema, but have previous extensive knowledge from other EDA software.But how do I edit the Eeschema template?I've found no way of doing this in KiCAD. I basically want to modify the lower-right-corner text box in the schematic editor to contain information of my choice and my style.I'm running KiCad 5.1.6, Lubuntu 20.04.Can someone point me in the right direction, please?Thank You.

author: apurvdate
author_rank: Contributor
timestamp: August 07, 2020, 04:37:41 am
content: Did you notice the Sheet icon on Kicad project browser? Create & save the layout as you want.You can import it in esschema or pcbnew in Page settings - 3rd icon in top row.In Page settings dialog select layout description file at bottom.

author: Benta
author_rank: Super Contributor
timestamp: August 07, 2020, 09:35:23 pm
content: Thank You.Unfortunately, that's not what I was looking for. I was looking for:1: a way to customize the Eeschema templates permanently. I've found suitable templates in /usr/share/kicad/template, but have no idea how to use them. They are neither available when opening a new project or a new schematic. I want to be able to use them in Eeschema.2: it is totally unclear how to set up a default template for Eeschema. It appears to be /usr/share/kicad/template/pagelayout_default.kicad_wks but replacing this file brings no change.3: when opening a new project from templates, I get a load of "Arduino" etc. templates, which are 1000% uninteresting to me.I've searched through the kicad directory tree looking for settings files. The KiCad GUI interface and menus do not contain anything useful.Attached the templates I'm talking about:

author: greenpossum
author_rank: Frequent Contributor
timestamp: August 07, 2020, 11:14:48 pm
content: In the project view there is an icon at the far right of the icon row that will start up the Page Layout editor.You can create your own layout files using the primitives available, then for eeschema or pcbnew you can apply it from File > Page Settings > Page Layout Description File.

author: Benta
author_rank: Super Contributor
timestamp: August 07, 2020, 11:21:52 pm
content: Thank You.Yes, I've gotten this far as well now. The issue is, that I have to do it every time I create a new schematic. I've found no way to set the file as default.Also, if I edit an existing template/layout, I'm not able to save it. When I try, the interface asks me for a path and filename. But how the **** should I know? I don't even know which template file was opened in the first place.The second thing that really bugs me is, that every time I start KiCAD, my last project/schematic is loaded. Why? I'd much rather start on a fresh page.I was getting to be friends with KiCad, but some of it's behaviour is so geeky/weird that I can't really imagine what the designers thought.

author: greenpossum
author_rank: Frequent Contributor
timestamp: August 07, 2020, 11:27:04 pm
content: Quote from: Benta on August 07, 2020, 11:21:52 pmGenerally you should specify your own file, as the original template is likely not writable by you as it's in a system area.I don't know how to replace the standard template though. You may have to break that last rule if you find where it is.Quote from: Benta on August 07, 2020, 11:21:52 pmIt's funny, but someone else recently had the exact opposite problem, it wouldn't open the last project. It turned out to be the way kicad is invoked.https://forum.kicad.info/t/autoload-recent-project-at-startup/24085TL;DR: for the current 5.1 version at least, pass in a dummy argument. If running from a GUI launcher, add an extra argument to the Exec command line.

author: Benta
author_rank: Super Contributor
timestamp: August 08, 2020, 12:09:00 am
content: @greenpossum, Thanks.Yes, I've copied my .kicad_wks files to /home/myname/.local/share/kicad/template. $HOME/.local/share is where I always place my own files copied from /usr/share. Updated KICAD_USER_TEMPLATE_DIR to reflect this as well.The default template is still a mystery, I'm beginning to suspect it might be in /lib - investigation open.Your suggestion on adding a dummy variable to the kicad command works great, but does emit five "CRITICAL" messages on the command line. Oh well...Still unresolved is how to get KiCAD to remember the file name in "Page layout description file".

author: greenpossum
author_rank: Frequent Contributor
timestamp: August 08, 2020, 01:14:21 am
content: Quote from: Benta on August 08, 2020, 12:09:00 amI reckon the Kicad command line interface is deficient. If it were a normal Linux program that would be an option to start without history and other things, and it would produce proper error messages for wrong arguments, non-existent project files and so forth.

author: Benta
author_rank: Super Contributor
timestamp: August 09, 2020, 10:33:04 pm
content: HA!At least the "default page layout" problem in 'Eeschema' now has a solution.The initial page layout is indeed hardcoded into the KiCAD binaries... who'd have imagined that in the 21st century.But with a lot of playing around, I finally found out how it works: The key is the /usr/share/kicad/template/kicad.pro file. This is the default project file that's copied to every new project right at the beginning.The final line in kicad.pro is:[eeschema/libraries]After this line, append:version=1PageLayoutDescrFile=pagelayout_default.kicad_wksThe file name is your preferred schematic page layout in /usr/share/kicad/templateI've not tested it with other file locations/names yet, but it works.EDIT:Just tested it with PageLayoutDescrFile=$HOME/.local/share/kicad/template/pagelayout_default.kicad_wksNice thing about this setup is, that if you don't have a personal page layout file, it will revert to the hard coded one with no issues.

author: PlainName
author_rank: Super Contributor
timestamp: August 10, 2020, 01:30:04 pm
content: QuoteSounds sensible to me given that:QuoteThe hardcoded one is the default if all other options fail. It would be remiss of the developernotto have it.

author: Benta
author_rank: Super Contributor
timestamp: August 10, 2020, 02:51:48 pm
content: Quote from: dunkemhigh on August 10, 2020, 01:30:04 pmYes, I can relate to that.What irks me is that the option to have a different default layout than the hardcoded one is completely undocumented in the KiCAD docs. I had to reverse engineer this to find a solution.Either lousy documentation, or I'm doing something I'm not supposed to that might be different in the next version. Not the best feeling, but OK.

author: PlainName
author_rank: Super Contributor
timestamp: August 10, 2020, 04:18:09 pm
content: QuoteYes, that I'll agree is seriously annoying. Open source, though - you're not allowed to complain