Convert schematic and pcb to SVG with command line?

I may have accidentally added dxf support when refactoring the other commands a little

4 Likes

which is the command to avoid contours? I see the parameter here

--use-contours

Woops, I fixed it

1 Like

No, we have been working solely on KiCad file formats. There were some other projects to convert Altium formats to KiCad but I’m not sure on the status on those.

You likely want to quote this so the shell doesn’t expand it to files in the current directory

--layers '*'

Maybe consider using all instead?

--layers all

heh, things you don’t think about when you exclusively use Windows :3

* isn’t the only concern then, there are other patterns like *.Cu as well

1 Like

@marekr

Thanks!
And can you add sch export to svg option?It will be very useful.

Schematic is harder due to codebase structure, I want to, but I’m not sure how far I’ll get.

Just do it! @marekr
If some components in schematic can not handle temporarily, just ignore it.
I will test sch to svg option at the first time.
Thanks!

BTW,I still can not use --layers * option with the latest 6.99. Kicad report:

Invalid layer name “*”
At least one or more layers must be specified

BTW, I think if export pcb to svg and set the background color of svg to black will be very helpful.
In svg tag add style = "background-color:black"

svg export of schematics is added.

4 Likes

@marekr Great Job! Thanks!
I have tested svg export of schematics, it works. But if I specify svg file name with -o option, kicad export a subfolder and the svg file is in this folder.

BTW,I still can not use --layers * option with the latest 6.99. Kicad report:

Invalid layer name “*”
At least one or more layers must be specified

BTW, I think if export pcb to svg and set the background color of svg to black will be very helpful.
In svg tag add style = "background-color:black"

By design at the moment. It generates an SVG per page/sheet of the schematic.

Fixed the missing * option

3 Likes

Thanks
How about supporting import option with kicad-cli tool? @marekr
I want to import altium designer’s pcbdoc and schdoc file to kicad with kicad-cli tool.
I have used the import function from Kicad GUI menu, and it can import pcbdoc and schdoc to kicad.
@marekr

Not in v7. Maybe v8 in 2024.

kicad-cli from Kicad v7 already exports SVG images of Schematics and PCBs

Here I have a simple script that does that one page/layer per file. Cheers!

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