Copy link to clipboard
Copied
Using extended panel I'm trying to rotate an entire document and it's elements 90 degrees.
The document consist of about 30 layers with some "hidden" meaning they are not displaying because they don't have any elements. The rotation would have to be on everything including artboard. Basically the equivalent of highlighting all and then "rotating" on the AI interface.
I've tried the rotate script: https://github.com/mprewitt/AI-Rotate-Artboard
It doesn't work as it says it's extremly buggy.
Is this possible in illustrator scripting?
This is a basic idea:
var groups = app.activeDocument.groupItems;
var d = app.activeDocument.artboards[0].artboardRect;
rect1 = app.activeDocument.pathItems.rectangle(d[1], d[0], d[2], -d[3]);
app.executeMenuCommand( "selectall" );
app.executeMenuCommand( "group" );
groups[0].rotate(-90);
app.executeMenuCommand( "deselectall" );
rect1.selected = true;
app.executeMenuCommand( "setCropMarks" );
app.activeDocument.artboards[0].remove();
app.executeMenuCommand( "selectall" );
app.executeMenuCommand(
...
Copy link to clipboard
Copied
This is a basic idea:
var groups = app.activeDocument.groupItems;
var d = app.activeDocument.artboards[0].artboardRect;
rect1 = app.activeDocument.pathItems.rectangle(d[1], d[0], d[2], -d[3]);
app.executeMenuCommand( "selectall" );
app.executeMenuCommand( "group" );
groups[0].rotate(-90);
app.executeMenuCommand( "deselectall" );
rect1.selected = true;
app.executeMenuCommand( "setCropMarks" );
app.activeDocument.artboards[0].remove();
app.executeMenuCommand( "selectall" );
app.executeMenuCommand( "ungroup" );
app.executeMenuCommand( "deselectall" );