Script for target selecting highlighted layers

Community Beginner ,
Dec 05, 2016 Dec 05, 2016

Copy link to clipboard

Copied

Hello!

I'm wondering if someone knows of or know how to write a script for target selecting all layers that you have highlighted?

The reason I'm wondering is because I would like to target (circle) select multiple layers at once simply by clicking at one layer, holding down shift (for PC) and then click on another layer in the layer list and that would select all layers in between. For some in explainable reason this can not be done in Illustrator 6 and CC (despite the fact that this is very basic and standard in all other programs). You can do this (shift select) if you are only looking to highlight select the layers but I need to do both without clicking 50+ layers every time.

Does anyone know of a script for doing this? I tried this script but I can not get it to work:

Adobe Illustrator script to select highlighted layers. Written by @Qwertyfly and only slightly modif...

TOPICS
Scripting

Views

1.7K

Likes

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
Adobe Community Professional ,
Dec 05, 2016 Dec 05, 2016

Copy link to clipboard

Copied

Do you mean you want to 'select all the artwork on the layer by clicking the circle on the right side of the layers panel'? Or do you just want to highlight a range of layers? The latter works fine for me, so i imagine you're trying to do the first one..

Likes

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 Beginner ,
Dec 05, 2016 Dec 05, 2016

Copy link to clipboard

Copied

Yes, I'm trying to select everything in the layer by circle selecting/ target selecting a bunch of highlighted layers.

I know you can highlight select using shift but for some odd reason you can not do the same with target select.

Likes

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
Enthusiast ,
Dec 06, 2016 Dec 06, 2016

Copy link to clipboard

Copied

You can:

1. Shift click to highlight

2. Lock others( in the fly menu of "Layers" panel)

3. Ctrl + A to select all

Likes

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
Adobe Community Professional ,
Dec 06, 2016 Dec 06, 2016

Copy link to clipboard

Copied

this works so long as none of the layers you want to select are currently locked. You'd have to unlock everything first, then highlight, then lock others and finally select all.

Great simple solution.

Likes

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
Participant ,
Dec 06, 2016 Dec 06, 2016

Copy link to clipboard

Copied

try changing the last loop to

var mylayers = get();  // get the highlighted layers

app.activeDocument.selection = null;  // clear any selection

// loop through the array of highlighted layers

for (var i = 0; i < mylayers.length; i++) {

  

     // unhide and unlock layer, then select all the artwork in that layer

     mylayers.locked = false;

     mylayers.visible = true;

    mylayers.hasSelectedArtwork = true;

  

}

Likes

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 Beginner ,
Dec 06, 2016 Dec 06, 2016

Copy link to clipboard

Copied

Zertle: Okej, that kind of worked...

Problem is that it selects the layers with that little colored square to the right or the circle. This means that everything IN that layer is selected BUT not the actual layer itself. If you try and add say appearances it is not applied to the layer but rather to each individual object in that layer.

Is there a way to change it so it target/circle selects the highlighted layers?

Likes

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
Enthusiast ,
Dec 07, 2016 Dec 07, 2016

Copy link to clipboard

Copied

OK, I know what your mean, Ctrl+A do select all the objects in the highlighted layers, but not the layers themselves.

Sad to say, that's impossible using script too.

If you want to add effects to multi-layers at once(which is the only situation you have to select layers like that, as i think), may be you can collect all these layers to a new layer, then add effects to the new layer.

Likes

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 Beginner ,
Dec 07, 2016 Dec 07, 2016

Copy link to clipboard

Copied

Ok, thanks for all your answers. That's too bad!

Adobe: I'm still amazed how something so simple isn't a standard feature since the first release.

Likes

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
Participant ,
Dec 08, 2016 Dec 08, 2016

Copy link to clipboard

Copied

What were you changing after selecting the layers? That step might be something that could be scripted, cut out the middle man, so to speak.

Likes

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 Beginner ,
Dec 06, 2016 Dec 06, 2016

Copy link to clipboard

Copied

& williamdowling:

I can't get that to work at all. I can highlight and lock others but when i hit ctrl+A nothing happens at all.

PS: I'm using CS6 and windows.

Likes

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
New Here ,
Jun 07, 2021 Jun 07, 2021

Copy link to clipboard

Copied

LATEST

You can do it with lasso tool. Select your shape or path with lasso tool and hold shift to draw on other areas to select multiple or select your one shape and go to select menu Select > Same > Shape or other options in menu.

 

I hope it helps.

Likes

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