Copy link to clipboard
Copied
How does Illustrator use scripts to select all non-native artwork? Thank you
1 Correct answer
There was a post (which is now a ghost) about it. I believe Carlos Canto made this.
// select non-Native objects
// https://forums.adobe.com/thread/1886524
if (app.documents.length > 0 ) {
var idoc = app.activeDocument;
var NonNativeItemsCount = idoc.nonNativeItems.length;
if (NonNativeItemsCount>0) {
for (i=0; i<NonNativeItemsCount; i++) {
idoc.nonNativeItems[i].selected = true;
}
alert('there are ' + NonNativeItemsCount + ' non-Native items');
}
else
alert('there are no non-Native items');
}
Explore related tutorials & articles
Copy link to clipboard
Copied
What type of item is your non-native artwork? Both placedItems and rasterItems have "selected" properites, which when assigned "true", select the item.
Copy link to clipboard
Copied
There was a post (which is now a ghost) about it. I believe Carlos Canto made this.
// select non-Native objects
// https://forums.adobe.com/thread/1886524
if (app.documents.length > 0 ) {
var idoc = app.activeDocument;
var NonNativeItemsCount = idoc.nonNativeItems.length;
if (NonNativeItemsCount>0) {
for (i=0; i<NonNativeItemsCount; i++) {
idoc.nonNativeItems[i].selected = true;
}
alert('there are ' + NonNativeItemsCount + ' non-Native items');
}
else
alert('there are no non-Native items');
}
Copy link to clipboard
Copied
thank you for your help

