-
-
Save Plastickid/1674f88f45167016d78c9329fb2331ab to your computer and use it in GitHub Desktop.
Adobe Illustrator script that exports layers as CSV file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#target illustrator | |
main(); | |
function main(){ | |
if(!documents.length) return; | |
var doc = app.activeDocument; | |
var docTitle = doc.name; | |
var docTitle = docTitle.substring(0, docTitle.length - 3); | |
var textFile = File('~/Desktop/' + docTitle +'_Layers.csv'); | |
var docText = ''; | |
for (var i = 0; i < doc.layers.length; i++) { | |
var currentLayer = app.activeDocument.layers[i]; | |
docText += currentLayer.name + '\r'; | |
} | |
textFile.open('e'); | |
textFile.write(docText); | |
textFile.close(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment