Skip to content

BoardLayer.values() only returns the first 9 user layers

Summary

Even if I add a user layer with a higher number, it's not returned by BoardLayer.values().

I would expect BoardLayer.values() to return all possible layers, so I'm expecting it to return User.1 – User.45, but it only returns the first 9, regardless of which numbered user layers are defined in the project.

image

Reproduction steps

from kipy.board import BoardLayer
for layer in BoardLayer.values():
    layer_std_name = canonical_name(layer)
    print(layer, "-", layer_std_name)

0 - Unknown
1 - Unknown
2 - Unknown
3 - F.Cu
4 - In1.Cu
5 - In2.Cu
6 - In3.Cu
7 - In4.Cu
8 - In5.Cu
9 - In6.Cu
10 - In7.Cu
11 - In8.Cu
12 - In9.Cu
13 - In10.Cu
14 - In11.Cu
15 - In12.Cu
16 - In13.Cu
17 - In14.Cu
18 - In15.Cu
19 - In16.Cu
20 - In17.Cu
21 - In18.Cu
22 - In19.Cu
23 - In20.Cu
24 - In21.Cu
25 - In22.Cu
26 - In23.Cu
27 - In24.Cu
28 - In25.Cu
29 - In26.Cu
30 - In27.Cu
31 - In28.Cu
32 - In29.Cu
33 - In30.Cu
34 - B.Cu
35 - B.Adhes
36 - F.Adhes
37 - B.Paste
38 - F.Paste
39 - B.SilkS
40 - F.SilkS
41 - B.Mask
42 - F.Mask
43 - Dwgs.User
44 - Cmts.User
45 - Eco1.User
46 - Eco2.User
47 - Edge.Cuts
48 - Margin
49 - B.CrtYd
50 - F.CrtYd
51 - B.Fab
52 - F.Fab
53 - User.1
54 - User.2
55 - User.3
56 - User.4
57 - User.5
58 - User.6
59 - User.7
60 - User.8
61 - User.9
62 - Rescue

Version Info

  • Python version: 3.11.3
  • kicad-python version: 0.2.0 (from PyPi)

KiCad full version info:

Application: KiCad PCB Editor x64 on x64

Version: 9.0.0-77-gf3523b6ad9, release build

Libraries:
	wxWidgets 3.2.6
	FreeType 2.13.3
	HarfBuzz 10.2.0
	FontConfig 2.15.0
	libcurl/8.11.1-DEV Schannel zlib/1.3.1

Platform: Windows 11 (build 22631), 64-bit edition, 64 bit, Little endian, wxMSW
OpenGL: Intel, Intel(R) Iris(R) Xe Graphics, 4.6.0 - Build 32.0.101.6127

Build Info:
	Date: Feb 24 2025 04:44:46
	wxWidgets: 3.2.6 (wchar_t,wx containers)
	Boost: 1.86.0
	OCC: 7.8.1
	Curl: 8.11.1-DEV
	ngspice: 44
	Compiler: Visual C++ 1942 without C++ ABI
	KICAD_IPC_API=ON

Locale: 
	Lang: sv_SE
	Enc: UTF-8
	Num: 1 234,5
	Encoded кΩ丈: D0BACEA9E4B888 (sys), D0BACEA9E4B888 (utf8)
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information