Answered
//a selection’s graphics as an array
var sg = app.selection[0].allGraphics
alert("There are " + sg.length + " graphics in the selection")
if (sg != null) {
for (var f = 0; f < sg.length; f++) {
sg[f].appliedObjectStyle = app.activeDocument.objectStyles.itemByName("AA");
}
}


Sign up
Already have an account? Login
To post, reply, or follow discussions, please sign in with your Adobe ID.
Sign inSign in to Adobe Community
To post, reply, or follow discussions, please sign in with your Adobe ID.
Sign inEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.
