Delete layer and move objects to existing layer

Is there a way to delete a layer and move the object to a new layer? Alternatively, a way to select all objects on a layer, including hidden, locked, and layout-space objects, for use with the Right Click > Change Object Layer method?

Couldn’t find anything in Help and seems relatively easy to script w/ Python (AllObjects(), GetLayer(), ObjectLayer()), but I was hoping someone would have an obvious or built-in solution / already written script. Or maybe a reason why such a script would be harder than I’m thinking?

Hello - nope, I think you’ll need a script.


So I was able to partially solve this one. It seems to work reliably for standard objects but runs into trouble with blocks. I did my best to implement some of the suggestions from this thread, but didn’t really solve it.

Strangely, I thought I had it solved at some point, and then maybe I ruined my code. I’m really not sure. I’ve attached the latest version, as well as an earlier version that I THOUGHT was working perfectly, but have since lost hope with.


Sample CSV:test.csv (174 Bytes)

SIMPLE (OLD VERSION, I thought this was handling blocks perfectly, but who knows…): (4.1 KB)

Hopefully someone can use these / improve upon them :slight_smile: