select spot color by name
Hi I have rectangles in all kinds of colors and other objects
I want to select only rectangles / shapes whose color contour line is Cutcontour. (Spot color)
Hi I have rectangles in all kinds of colors and other objects
I want to select only rectangles / shapes whose color contour line is Cutcontour. (Spot color)
Thanks, I understand, it works, but it is not possible to select the contour without selecting the swatches window?
Yes, it is possible to select the objects that have CutContour applied by parsing all pathItems exists in he document. Try following snippet
var doc = app.activeDocument;
var pathItems = doc.pathItems;
var colorName = 'CutContour';
app.executeMenuCommand("deselectall");
for (var j = 0; j < pathItems.length; j++) {
if (pathItems[j].stroked && pathItems[j].strokeColor.spot && pathItems[j].strokeColor.spot.name == colorName) {
pathItems[j].selected = true;
}
}
NOTE: Not tested from my side but it should work.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.