This script should do it.
function main() {
// settings:
var myAngle = prompt('Rotate all graphics by amount:', 90),
absoluteRotation = true;
if (myAngle == null)
return;
var doc = app.activeDocument,
tm = app.transformationMatrices.add({ counterclockwiseRotationAngle: Number(myAngle) }),
graphics = doc.allGraphics;
for (var i = 0; i < graphics.length; i++)
graphics[i].transform(CoordinateSpaces.PARENT_COORDINATES, AnchorPoint.CENTER_ANCHOR, tm, absoluteRotation ? MatrixContent.ROTATION_VALUE : undefined);
}
app.doScript(main, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, 'Rotate all graphics');
Note: this will set the rotate of every graphic *to* a particular angle, and running the script twice won't do anything. But if you change absolute rotation to false
absoluteRotation = false;
then it will rotate *by* the amount each time you run the script.
- Mark