Simple-but-tricky script that exports each layer of an Adobe Illustrator to separate svg files
(1 layer => 1 .svg)
If you use an existing file, ensure each element you'd like to be exported as svg is one unique layer.
If not, then you'll have to fix it first (manually).
Any script automating this task would be appreciated !
If you are likely to create a file from scratch then export its elements, then keep in mind building a single layer for every single element. Merging every element in the layer might help.
- Open your file
- Depending on your version of Illustrator, go to File / Scripts / Import Script
- A dialog box will open. At this step of development (almost null), the select menu has "svg" selected by default, but the options are JPG options. Just switch the select to "JPG" then back to "SVG" and you're done (if you can fix this, push !)
- Choose a folder where to put the svgs (and also a script that should repeat the process. Honestly I didn't try it)
- Cross fingers while having a look at the selected export folder.
- Works ? Great !! Doesn't ? Find why in Adobe's Documentation (I'm too busy for that at the moment :o)
Enjoy !