How to keep measurement dimensions units when open Pcbnew 5 file in KiCad 7?

I created a *.kicad_pcb-File with Pcbnew 5. I made some measurement dimensions to it, in Millimetre (of course). However, when i open it in KiCad 7 the unit changes to Zoll (in).

Is there a way to keep KiCad 7 from changing the units?

I am aware in Pcbnew 5, you can remove the display of the unit and you can’t do that in KiCad 7. However, the unit should still not change.

Application: KiCad PCB Editor

Version: (7.0.0-dirty), release build

wxWidgets 3.0.5
FreeType 2.10.4
HarfBuzz 2.7.4
FontConfig 2.13.1
libcurl/7.74.0 GnuTLS/3.7.1 zlib/1.2.11 brotli/1.0.9 libidn2/2.3.0 libpsl/0.21.0 (+libidn2/2.3.0) libssh2/1.9.0 nghttp2/1.43.0 librtmp/2.3

Platform: Debian GNU/Linux 11 (bullseye), 64 bit, Little endian, wxGTK, lightdm-xsession, x11

Build Info:
Date: Feb 24 2023 11:03:34
wxWidgets: 3.0.5 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
Boost: 1.74.0
OCC: 7.5.1
Curl: 7.74.0
ngspice: 34
Compiler: GCC 10.2.1 with C++ ABI 1014

Build settings:


test.kicad_pcb (3.5 KB)

Yes, of course.

Start by realizing that all measurements in KiCad are always metric. KiCad uses 32 bit integers with nanometer resolution internally, and everything non metric is rounded / approximated. (To make it fit in Nanometers. KiCad does not just throw away precision).

If you look at the properties of a dimension, you can change a lot of it’s properties. “Units” can be automatic (then it follows the GUI setting), or fixed to one of the units. The other boxes mostly speak for themselves, or you read the manual from the help menu, or from: PCB Editor | 7.0 | English | Documentation | KiCad

Setting these one by one is a bit tedious. You can set defaults for dimensions in PCB Editor / File / Board Setup / Text & Graphics / Defaults.

Thank you for your time.
I know that. I can go to every Dimension in a PCB and change every one of them.

But my question was, how can i prevent Kicad from switching to a non-metric system in the first place?

I am mostly interested that this command outputs the correct dimension:

kicad_cli pcb export pdf …

At best without updating the file to KiCad 7 or by doing it automatically.

Few hours ago I noticed the same when opening V5 PCB with V6.
All Dimensions that I had in form “30 mm” were changed to “30.0000 mm”.
I had one “3” (without mm) and it was changed to “0.1181 in”.

After checking the file, there was no unit info in dimensions in Pcbnew 5.

The question remains, why was the default chosen to be a stupid non-metric unit. Wouldn’t a metric unit make more sense or choose automatic, since KiCad 7 has this function?

I think the reason is the same why THT IC pins are in 2.54 raster.

everything non metric is rounded / approximated.

It shouldn’t need to be…

One inch is exactly 25.4 mm, and one mill/thou is exactly 0.0254 mm or 25400 nm. You’d need to be working at millionths-of-an-inch for nanometer-level precision to need rounding. And I suspect there are better tools than KiCad for VLSI wafer fab…

It can be irritating when some components are defined in Imperial units (usually THT) and some in metric (typical for SMD) but it’s just something that you get used to. The align and distribute tools really help to make the board neater when you’re stuck mixing unit systems.

Hi @johannespfister

I think the issue you created is good, but I take issue with the word “stupid” and this comment “(98% of users use mm anyway and if they still use inches they should switch to metric anyway).”

Not really necessary.

1 Like

I am sorry, i hate non-metric units with some passion.

One inch is exactly 25.4 mm

Well, yes and no. There is a inch, the international inch, which is exactly defined as 25.4 mm. But there are a lot of other units which are also called inch that aren’t 25.4mm. Which was the main reason we adopted the metric system.
One example is a Taiwanese inch, which is 33+1/3 mm.

I am Australian. My country was Imperial 'till I was about 15 years old, when we changed to Metric, consequently, I was educated in both systems.

This has been of great benefit when dealing with electronics.

Semiconductors, and their packaging, have been, and still are, a US development, and the US was Imperial. The US semiconductor industry is converting to Metric, but it takes time and there will always be the problem of historical packaging.

Certainly, data sheet packaging is now quoted in Metric, but that is often a conversion from Imperial; the numbers change but it is still the same old package.
DIP16 is 8 X 1/10 inch or 8 X 2.54 mm. I find 8 X .1 is easier than 8 X 2.54 to multiply.
SSOP is .025 inches = 40 per inch. SOTs are .05 inches = 20 per inch… another two that are easier to work with than .65mm or 1.27mm
BGAs, however, are a new package: .8mm, so when using, the brain switches to metric.

I’m not commenting on which system is better, all I’m commenting on is: there are two systems, and, on occasions, it is of benefit to be conversant with both and be able to switch. :slightly_smiling_face:



US was Imperial

Not really. They have a huge mess. For example everyone uses Volt, which is kg*m^2/(s^3*A). If they where imperial they would use something like lb*in*miles/(s^3*A), but they don’t. And then they create units like Ω/ft, which is kg*m^2/(s^3*A^2*ft), which is, assuming you use the international foot, 0.3048*kg*m/(s^3*A^2). Now you have a unit which has a factor of 0.3048 in it. Why?

The other point is: You have to understand the metric system before you can understand British Imperial units. You have to learn how long a metre is and how we define it before you can understand the definition of the international inch/foot/yard …

there are two systems

Yes, the metric system and Planck units.
I wouldn’t call it a system when you have all sorts of random factors in it: 12, 3, 1760, 22, 220, 20, 2, … (and this assumes there would just be a single definition per unit. And that is just for length measurements). Can you convert between miles and yards in your head? Or even just foot and inches? Try it with cubic ft vs cubic inches. You can do it with km vs m vs cm vs mm vs µm very easily.

another two that are easier to work with than .65mm or 1.27mm

It would even be easier to work with 1mm than 0.025 inch and easier than 1.27 mm.
And then i have a breadboard that has a 2.54mm grid which i have to mount on 2 holes that have distance of 100mm.

By the way, do you say 1.2 inch or 1.2 inches?

We could save a lot of cost and make life a lot simpler if we just would use the metric system.


You failed to mention:
1000Kg = 1 Tonne
2000lbs = 1 Ton (short ton)
2240lbs = 1 Ton (long ton)

You may enjoy this short guide :wink:

1 Like

For anyone interested (@Piotr ? since you had the same bug), there is now a fix that chooses automatic unit mode when importing and the unit isn’t written.
See here: When importing legacy PCB dimension: Use automatic dimension when Unit couldn't be determined (!1539) · Merge requests · KiCad / KiCad Source Code / kicad · GitLab