Hi All,
I'm trying to do some workflow enhancements. For our games we need to export to PNG at different resolutions for different mobile devices. I use a artboard per asset and currently manually export 3 times (using file/export/png with use artboards option), at 72 dpi, 144 dpi and 33.75 dpi.
I've been modifying a simple Javascript I downlaoded and have got it save to different fixed locations at different scales. All good. However exporting every artboard each time will cause issues with our version control system and take too long. It's not really a solution.
So I need a way to either only export the current selected artboards (which I believe can't be done) or somewho show the artboard range dialog that the system uses. Either of those would be a good solution.
Can it be done?
I'm using CS5.
Here is where I'm at so far - please be kind, I'm a dabbler and not very experienced!
var docRef = app.activeDocument; var num_artboards = docRef.artboards.length; var getName = app.activeDocument.name; var fileName = getName.slice(0, -3); for (var i = 0; i < num_artboards; i++ ) { var destFile = new File("/Users/malcolmreed/Desktop/tests/double/" + fileName + "_" + docRef.artboards[i].name + ".png"); var options = new ExportOptionsPNG24(); options.artBoardClipping = true; options.matte = false; options.horizontalScale = 200.0; options.verticalScale = 200.0; options.transparency = true; docRef.artboards.setActiveArtboardIndex(i); docRef.exportFile (destFile, ExportType.PNG24, options); } for (var i = 0; i < num_artboards; i++ ) { var destFile = new File("/Users/malcolmreed/Desktop/tests/standard/" + fileName + "_" + docRef.artboards[i].name + ".png"); var options = new ExportOptionsPNG24(); options.artBoardClipping = true; options.matte = false; options.horizontalScale = 100.0; options.verticalScale = 100.0; options.transparency = true; docRef.artboards.setActiveArtboardIndex(i); docRef.exportFile (destFile, ExportType.PNG24, options); }