Author Topic: How to edit the schematic templates - the lower right corner?  (Read 550 times)

0 Members and 1 Guest are viewing this topic.

Offline Benta

  • Super Contributor
  • ***
  • Posts: 2544
  • Country: de
How to edit the schematic templates - the lower right corner?
« on: August 06, 2020, 09:55:33 pm »
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.
« Last Edit: August 06, 2020, 09:59:17 pm by Benta »
 

Offline apurvdate

  • Contributor
  • Posts: 24
  • Country: in
Re: How to edit the schematic templates - the lower right corner?
« Reply #1 on: August 07, 2020, 04:37:41 am »
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.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 2544
  • Country: de
Re: How to edit the schematic templates - the lower right corner?
« Reply #2 on: August 07, 2020, 09:35:23 pm »
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:


 

Offline greenpossum

  • Frequent Contributor
  • **
  • Posts: 345
  • Country: au
Re: How to edit the schematic templates - the lower right corner?
« Reply #3 on: August 07, 2020, 11:14:48 pm »
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.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 2544
  • Country: de
Re: How to edit the schematic templates - the lower right corner?
« Reply #4 on: August 07, 2020, 11:21:52 pm »
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.

« Last Edit: August 07, 2020, 11:26:10 pm by Benta »
 

Offline greenpossum

  • Frequent Contributor
  • **
  • Posts: 345
  • Country: au
Re: How to edit the schematic templates - the lower right corner?
« Reply #5 on: August 07, 2020, 11:27:04 pm »
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

Generally 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.

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.

It'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/24085

TL;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.

« Last Edit: August 07, 2020, 11:30:47 pm by greenpossum »
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 2544
  • Country: de
Re: How to edit the schematic templates - the lower right corner?
« Reply #6 on: August 08, 2020, 12:09:00 am »
@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".

« Last Edit: August 08, 2020, 12:12:25 am by Benta »
 

Offline greenpossum

  • Frequent Contributor
  • **
  • Posts: 345
  • Country: au
Re: How to edit the schematic templates - the lower right corner?
« Reply #7 on: August 08, 2020, 01:14:21 am »
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...

I 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.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 2544
  • Country: de
Re: How to edit the schematic templates - the lower right corner?
« Reply #8 on: August 09, 2020, 10:33:04 pm »
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.   :palm:

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:

[schematic_editor]
version=1
PageLayoutDescrFile=pagelayout_default.kicad_wks

The file name is your preferred schematic page layout in /usr/share/kicad/template
I'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_wks
Nice 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.
« Last Edit: August 09, 2020, 11:20:22 pm by Benta »
 

Offline dunkemhigh

  • Super Contributor
  • ***
  • Posts: 2072
Re: How to edit the schematic templates - the lower right corner?
« Reply #9 on: August 10, 2020, 01:30:04 pm »
Quote
The initial page layout is indeed hardcoded into the KiCAD binaries... who'd have imagined that in the 21st century.

Sounds sensible to me given that:

Quote
[schematic_editor]
version=1
PageLayoutDescrFile=pagelayout_default.kicad_wks

The file name is your preferred schematic page layout in /usr/share/kicad/template

The hardcoded one is the default if all other options fail. It would be remiss of the developer not to have it.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 2544
  • Country: de
Re: How to edit the schematic templates - the lower right corner?
« Reply #10 on: August 10, 2020, 02:51:48 pm »
The hardcoded one is the default if all other options fail. It would be remiss of the developer not to have it.

Yes, 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.
 

Offline dunkemhigh

  • Super Contributor
  • ***
  • Posts: 2072
Re: How to edit the schematic templates - the lower right corner?
« Reply #11 on: August 10, 2020, 04:18:09 pm »
Quote
a different default layout than the hardcoded one is completely undocumented

Yes, that I'll agree is seriously annoying. Open source, though - you're not allowed to complain :)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf