I know the new Grease pencil exports are written in C and just released in 2.93 but I was wondering if there is a python api to run these export commands or a workaround.

  • $\begingroup$ Have you enabled python tool tips? You can check for it that way usually. $\endgroup$
    – TheLabCat
    Jun 25, 2021 at 14:02
  • 1
    $\begingroup$ Yeah that was one of the first things I tried. All I see that could be related is bpy.ops.file.execute() but nothing stands out as being the correct python call. $\endgroup$ Jun 25, 2021 at 17:28

1 Answer 1



svg bpy.ops.wm.gpencil_export_svg(filepath='/your/filepath/test.svg')

pdf bpy.ops.wm.gpencil_export_pdf(filepath='/your/filepath/test.svg')

I found this out by looking at this commit



You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .