5.99 - adding more grids to PCB/footprint editor

I am wondering why it is not possible to manage grids in KiCAD other than modifying the underlying related files…

I think adding grids to files was first aid and the real larger scale solution comes with https://gitlab.com/kicad/code/kicad/-/issues/2483.

I can’t find the file in Win10. Has anything changed in KiCad version 6?

elekgeek wrote:
For windows locations seems to be: C:\Users\elekgeek\AppData\Roaming\kicad\5.99

Hope it helps, if not, let us know.

In the meantime, it changed to 6.0.

I do not use windows myself, and can’t remember where KiCad put’s it’s configuration files on that system. The The quickest way to find it is probably to just have your operating system search for those filenames. (I do assume that windoze is capable of searching for files.)

Now that I had that file open, I shortened the list.
Removed a bunch of those mil settings and for the metric I used exponents of 1 and 2.5 (which also puts .5 on two grid points) and on the bottom I extended it to micrometers.

    "display": 0,
    "footprint_text_shown_columns": "0 1 2 3 4 5 6",
    "grid": {
      "axes_enabled": false,
      "fast_grid_1": 4,
      "fast_grid_2": 5,
      "last_size": 14,
      "line_width": 1.0,
      "min_spacing": 10.0,
      "show": true,
      "sizes": [
        "100 mil",
        "25 mil",
        "10 mil",
        "1 mil",
        "2.5 mm",
        "1.0 mm",
        "0.25 mm",
        "0.1 mm",
        "0.25 mm",
        "0.01 mm",
        "0.025 mm",
        "0.001 mm"
      ],
      "snap": 1,
      "style": 0,

After that I verified that the new list is actually used in Pcbnew V6.0.1

1 Like

OK, thanks i found it The win 10 path is:
%AppData%\kicad\6.0\pcbnew.json

pcbnew.json Will be overwritten on reboot.
Is there another way to set the grid size?

I just did a reboot of my linux box just to check this, and for me it did not get overwritten. The changes I made are still present.

However, KiCad is very finicky about the syntax in that file.
For example, if there is a comma behind the last entry in that table, then KiCad seems to reject the whole file and get some defaults from elsewhere.

Rebooting the OS or machine shouldn’t have any effect on that by itself. If by rebooting you mean restarting KiCad, it saves the configuration files when it exits, so if you keep it open, make changes to a file manually and exit KiCad, the changes are overwritten.

Neither has it.

[quote=“eelik, post:29, topic:31815”]
If by rebooting you mean restarting KiCad, it saves the configuration files when it exits, so if you keep it open, make changes to a file manually and exit KiCad, the changes are overwritten.
[/quote]I know that too and expected it. But an “open” and “close” again should have no effect on the setting. But she has.


Settings on the left, results on the right

You are modifying the wrong table.
That table is for the footprint viewer, not for pcbnew itself.
There are at least three such tables in that file.
For Pcbnew I modified the table around line 370.

pcbnew.json.js (11.1 KB)The first is the file. I only added the file extension js.


Everything is OK in the PCB editor.

In the footprint editor it is wrong.

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