I know that Inkscape does not have the ability to export selected objects as svg, but is there a workaround that people have found that works?
A straight-forward method is the following:
- Select the object(s) to export.
- "Resize page to drawing or selection" (File → Document Properties) or Ctrl+Shift+R.
- "Invert selection" (Edit → Invert selection) or !, and Del all other objects.
- "Save As" with Ctrl+Shift+S.
- Select Optimized SVG as the format if you want to use it on the web.
Not as quick as I would like but quicker than creating a new document for each graphic that you want to export.
I keep another instance of Inkscape running on the side and just copy-paste the object I want to save into the scratch document, then
Another option if you just want the path data is to select the object, Shift+Ctrl+X to open the XML editor, grab the pieces you want (usually the
d attribute), then paste to wherever.
As of Inkscape 1.2+ there is now a native way to batch export multiple objects to SVG, or even any other format supported.
You can do this from the regular File > Export dialog. In the Batch tab you can export either Layers, Selection, or Pages.
Using the Object Properties dialog Ctrl + ⇧ Shift + O, add an ID or Label that will be used to determine the file name when exporting.
Set up all objects you want to export either into separate groups (if they are composed of separate elements), and either select them, place each one in a dedicated layer, or set up one individual page, one per desired exported file.
You can even batch export to multiple file formats simultaneously, by pressing the Add button and choosing different extensions.
It allows choosing any file format available in for saving, including vector ones. To take full advantage of this functionality you may have to enable it in Edit > Preferences > Input/Output > Show all outputs in Export Dialog.