Answered
Remove unused Swatch Groups
Hi, guys!
Is there any script code to remove unused core sample group? I know the code to erase color swatches, but not groups.
Exmple to remove color swatches (not groups):
var allDocs = app.documents;
for (var i = 0; i < allDocs.length; i++) {
trashUnusedSwatch (allDocs[i]);
}
function trashUnusedSwatch(myDocument){
var id, sw;
while (myDocument.unusedSwatches[0].name != "") {
id = myDocument.unusedSwatches[0].id;
sw = myDocument.swatches.itemByID(id);
sw.remove();
}
}
