Skip to main content
Inspiring
September 20, 2018
Answered

How to search / filter objects by name in Layers panel?

  • September 20, 2018
  • 3 replies
  • 8532 views

Is there any way exists for filter (via typing substring) list of all document objects in Adobe Illustrator Layers panel? For quick find and select objects with same word in name.

This topic has been closed for replies.
Correct answer pixxxelschubser

Yes, possible with scripting.

Here you go:

// select_byPartOfName.jsx

// does not work with 'automatically' named text frame items

// https://forums.adobe.com/message/10636405#10636405

var aDoc = app.activeDocument;

var pI = aDoc.pageItems;

aDoc.selection = null;

    $.writeln(pI.length)

for (i=pI.length-1; i>=0; i--) {

    $.writeln(pI.name.match(/test/i))

    if (pI.name.match(/test/i) != null) {

        pI.selected = true;

        }

    }

3 replies

Participant
March 20, 2023

I have a very good idea:

you could just open the svg in a text editor and then pattern search there. Cannot filter... but IntelliJ does the trick for searching with complex regexes

Srishti Bali
Community Manager
Community Manager
September 24, 2018
S_Gans
Community Expert
Community Expert
September 22, 2018

As far as I can tell, the only way to accomplish this would be with a script. I did find one online, but it seems to be a work in progress. I'm not a scripting expert, but perhaps someone on this forum would be more adept in writing something like that. I'd find it helpful, as well!

Adobe Community Expert / Adobe Certified Instructor
pixxxelschubser
Community Expert
pixxxelschubserCommunity ExpertCorrect answer
Community Expert
September 23, 2018

Yes, possible with scripting.

Here you go:

// select_byPartOfName.jsx

// does not work with 'automatically' named text frame items

// https://forums.adobe.com/message/10636405#10636405

var aDoc = app.activeDocument;

var pI = aDoc.pageItems;

aDoc.selection = null;

    $.writeln(pI.length)

for (i=pI.length-1; i>=0; i--) {

    $.writeln(pI.name.match(/test/i))

    if (pI.name.match(/test/i) != null) {

        pI.selected = true;

        }

    }

MurzNNAuthor
Inspiring
October 17, 2018

Thanks for so short but very useful script! Will be good to have build-in object filter in Adobe Illustrator interface, for example in bottom line of Objects panel.