Pardon my question, but what does strip out mean in conjunction with layers?
There is no way to search for a layer by name, it is a long time feature request and I am thinking of expanding the request to search artboards by name as well, once the support for naming artboards is implemented.
Maybe a script, but for that you should go to the Illustrator Scripting Forum.
I think he means removes it.
Ah, sorry - I probably shouldn't have used a common print term as a metaphor for "delete." By "strip out", I meant that I want to remove the layer in some instances. For example, I have a pre-flight action that I use to save PDFs, and while the template layers don't print, I don't want them there at all. The extra layers cause some weirdness in exporting EPS's, occassionally.
It seems that this may be impossible, which is a shame. I wonder if you can call specific layers by layer order, like you can do in photoshop?
Thanks for the follow-up.
Actions will not move to Layers, as you've discovered. but you can accomplish what you want through a series of "Lock Others" and "Unlock All Layers" and "Flatten Artwork" commands, which are recordable. They are accessed from the Layers panel fly-out menu.
Illustrator always selects the top layer when a file is opened, so the sequence depends on how your template is constructed. For example, to remove the bottom layer, the sequence would be:
Layer: Lock Others
Layer: Unlock All Layers
Layer: Flatten Artwork
Hope this helps...
This is a good workaround, thanks. Throw me a pen when the petition goes round to Adobe for scriptable layers!
I appreciate all the help!