Create Fitted Artboards from layers?
Hey everyone,
Does anyone know of a script that will create artboards for each separate layer?
Thanks in advance,
Andy
Hey everyone,
Does anyone know of a script that will create artboards for each separate layer?
Thanks in advance,
Andy
While I think this is possible ( not actually tried this out ) it would only make sence to do… if each layer's art does not over lap in any way?
#target illustrator
main();
function main() {
if ( app.documents.length == 0 ) { return; }
var doc = app.activeDocument;
doc.layers[0].hasSelectedArtwork = true;
doc.fitArtboardToSelectedArt( 0 );
doc.selection = null;
for ( var i = 1; i < doc.layers.length; i++ ) {
doc.artboards.add( [0,0,72,-72] );
doc.layers.hasSelectedArtwork = true;
doc.fitArtboardToSelectedArt( i );
doc.selection = null;
};
};
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.