# Render to vector file using command line + Freestyle

I am trying to render to a vector file using Freestyle. I have enabled it in my file and when I render to image via GUI, it generates both a PNG and an SVG file, so everything is OK. When I do it via command line (using the same file), it only generates the PNG file. This is the command that I'm using:

 --background x.blend --python blender_script.py -E BLENDER_EEVEE -o C:\\tmp\vector.svg -f 0


In blender_script.py I'm only changing the line weight.

How can I get the SVG file via command line (or editing the python script)

Thanks!

EDIT: It started working with this exact command line after I restarted Blender (maybe then it saved the settings related to Freestyle when I closed it?)

• What exactly blender_script.py is doing? – brockmann Feb 13 at 11:51
• It only changes the line thickness like this scene.render.line_thickness = 20.0 – Marc Feb 13 at 11:53
• Set the extension to any supported image format like -o C:\\tmp\vector.png and the svg file comes along if freestyle svg addon is enabled. – brockmann Feb 13 at 12:03
• It started working with the exact command line that I was using after I restarted Blender (maybe it saved the settings related to Freestyle when I closed it?) – Marc Feb 13 at 12:19
• Not sure what do you mean by this comment, the only thing I can say is that it's working (I did test it) when using an extension that is regonized by blender @Marc – brockmann Feb 13 at 12:25