I’m trying to export User.Drawings layer, but I got “Invalid layer name” are all layers supported?
kicad-cli pcb export pdf -o fig/pcb_drawing.pdf ./light_ring_3535x6.kicad_pcb -l User.Drawings
Invalid layer name "User.Drawings"
At least one or more layers must be specified
I don’t thing so, this is the output with the blank:
kicad-cli pcb export pdf -o fig/pcb_drawing.pdf ./light_ring_3535x6.kicad_pcb -l User .Drawings
Maximum number of positional arguments exceeded
Usage: pdf [-h] [--output VAR] [--layers VAR] [--exclude-refdes] [--exclude-value]
[--include-border-title] [--black-and-white] [--theme VAR] input
Positional arguments:
input Input file
Optional arguments:
-h, --help shows help message and exits
-o, --output Output file name [default: ""]
-l, --layers Comma separated list of untranslated layer names to
include such as F.Cu,B.Cu [default: ""]
--erd, --exclude-refdes Exclude the reference designator text
--ev, --exclude-value Exclude the value text
--ibt, --include-border-title Include the border and title block
--black-and-white Black and white only
-t, --theme Color theme to use (will default to pcbnew settings
) [default: ""]
paul@cezanne:~$ kicad-cli -h
Usage: kicad-cli [-h] {fp,pcb,sch,sym,version}
Optional arguments:
-v, --version prints version information and exits
-h, --help shows help message and exits
Subcommands:
fp
pcb
sch
sym
version
It does not even mention the “export” thing, and there is no man page installed either.
However, a quick test shows that exporting F.Cu works, while User.Drawings gives an error message.
paul@cezanne:~/projects/kicad/mumar_base_stm32_V5.1$ kicad-cli pcb export pdf mumar_base_stm32.kicad_pcb -l F.Cu
Loading board
paul@cezanne:~/projects/kicad/mumar_base_stm32_V5.1$ kicad-cli pcb export pdf mumar_base_stm32.kicad_pcb -l User.Drawings
Invalid layer name "User.Drawings"
At least one or more layers must be specified
Usage: kicad-cli [-h] {fp,pcb,sch,sym,version}
Optional arguments:
-v, --version prints version information and exits
-h, --help shows help message and exits
Subcommands:
fp
pcb
sch
sym
version
~
❯ kicad-cli pcb -h
Usage: pcb [-h] {export}
Optional arguments:
-h, --help shows help message and exits
Subcommands:
export
~
❯ kicad-cli pcb export -h
Usage: export [-h] {drill,dxf,gerber,gerbers,pdf,pos,step,svg}
Optional arguments:
-h, --help shows help message and exits
Subcommands:
drill
dxf
gerber
gerbers
pdf
pos Generate Position File
step
svg
~
❯ kicad-cli pcb export pdf -h
input: 1 argument(s) expected. 0 provided.
Usage: pdf [-h] [--output VAR] [--layers VAR] [--exclude-refdes] [--exclude-value] [--include-border-title] [--black-and-white] [--theme VAR] input
Positional arguments:
input Input file
Optional arguments:
-h, --help shows help message and exits
-o, --output Output file name [default: ""]
-l, --layers Comma separated list of untranslated layer names to include such as F.Cu,B.Cu [default: ""]
--erd, --exclude-refdes Exclude the reference designator text
--ev, --exclude-value Exclude the value text
--ibt, --include-border-title Include the border and title block
--black-and-white Black and white only
-t, --theme Color theme to use (will default to pcbnew settings) [default: ""]
~
Also you can put there * and the it will export all layers (didn’t check whether it is actually all):
I can confirm that exporting “Dwgs.User” works, while the layer is called “User.Drawings” in the KiCad project.
I also had a look at gitlab and apparently there is no issue for this. I already started creating an issue for it, but aborted. I guess I’ll leave it to you first if you want to do this.
Unfortunately the wildcard * layer selector does not work and I find I have to specify each layer explicitly. This is unfortunate and, if wildcard selection did work, it might address this problem ….
Apparently JP already fixed, it should appear in the test build in the next day, it would be cool it you could check that everything works as expected.