Select same name sub-layers at once

I have this kind of layer tree:

1
-a
-b
-c

2
-a
-b
-c

…where a, b, c are sub-layers of 1 and 2 respectively.

I need a way to selet all sub-layers with the same name at once, to then click on the hide/show/lock buttons, as I have 1-10 (parent layers). I.e. select all ‘a’ or all ‘b’, etc.

Thanks for thoughts.

I can’t remember offhand if -SelLayer (with dash) can take wildcards… In that case

-SelLayer *-a

should do it, I think. No time to try it this second…

–Mitch

That will select the objects on the layers; I think the idea is to select the layers in the layer dialog, and I do not see a way to do that. Wait @DuncanW - you do that first, what Mitch says, and then in the Tools menu (hammer icon) in the layer dialog, choose “Select object layer”

-Pascal

Nice tip Pascal, @Steve1, check this out…

Hi guys, thanks for this.

I can’t seem to get that to work. I enter -SelLayer …and the moment I hit the spacebar to follow with *-a, it already executes the command of course.

It then offers “Pick” and asks for objects, which is not what I need. I need to highlight all sub-layers with the same name across various parent layers, to then quickly turn them on/off.

Type -SelLayer, then Enter
Type *-a, then Enter

All objects on layers whose names end in “-a” should select
Go to the layer panel, hit the hammer (rightmost) icon in the top bar
Choose “Select object layer”

HTH, --Mitch

The second step doesn’t work.

The full name of my identical sublayers is called “Angles”. Thus I tried *-les and just *-s, too. Doesn’t select anything I’m afraid.

Just *les should work. * is a wildcard. The dash is not part of the wildcard, so it is looking for something that ends in “-les” which “Angles” does not.

Also xx* will find anything that starts with xx
*xx* will find anything that contains xx

HTH, --Mitch

Okay awesome, it works.

Many thanks!

EDIT: one more thing: Can I incorporate the “Select object layer” into an Alias somehow?

Hi @DuncanW

I think the misunderstanding comes from you calling your sub-layers “-a” and “-b” etc. in the original post. Like Mitch said, the dash is not part of the command - @Helvetosaur just put it there, because that’s what you called your layers in the original post.

Hope that clears it up :smile:

-Jakob

Yeah thanks. The hyphen was just to indicate it as a sublayer.

Any ideas regarding the alias?

Hi Duncan - I do not see any way to alias that. There is not a command, as far as I can tell, associated with that layer panel function.

-Pascal

Okay thanks anyway. This is already helpful.