Answered
rob dayCorrect answer
Community Expert
Aug 11, 2025 2:29 PM UTC
//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");
}
}


