• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to select non-native artwork with script?

Explorer ,
Aug 07, 2020 Aug 07, 2020

Copy link to clipboard

Copied

How does Illustrator use scripts to select all non-native artwork? Thank you

TOPICS
Scripting

Views

559

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Aug 07, 2020 Aug 07, 2020

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');
}

Votes

Translate

Translate
Adobe
Guide ,
Aug 07, 2020 Aug 07, 2020

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. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 07, 2020 Aug 07, 2020

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');
}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 08, 2020 Aug 08, 2020

Copy link to clipboard

Copied

LATEST

thank you for your help

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines