Is there a quick way to simultaneously delete all objects in a layer if these objects are found across several layout tabs and model space?
At the moment, I'm getting the objects using:
(setq a (ssget "X" '((8 . "Revision"))))
This finds all objects in the drawing, but if I just use:
(command "_.erase" a "")
to delete them, only the the objects in the current layout or space are getting deleted...
LAYDEL does that, and also purges the Layer out of the drawing. [I'm not in a place right now where I can test whether that can be used in AutoLISP, but it's pretty simple to do manually.]
It's true of all object selections in (command) functions that they only "see" objects in the current space. And stepping through that selection and using (entdel) on each item in it doesn't do what you're looking for, either, even though in many other ways objects in non-current spaces can be worked on with (ent...) and other functions.