Tim,
Two questions:
1. vla-delete honers locked layers or not?
2. No problem looping through the layout collections?
From the Help file I see this
vla-delete
Remarks
When you delete an object in a collection, all remaining items in the collection
are reassigned a new index based on the current count. You should therefore
avoid loops that delete an object while iterating through the collection.
1 - Will throw an error. I never lock layers, so I never encountered that error. Thanks for pointing that out.
2 - I haven't had any problems. Good point though, and I don't remember reading that. I guess if this is true, then I could make a list of all the objects, and then delete from the list. Maybe when I get some free time I will check it out.
I just did a quick little test. In a new drawing I created a layer, froze it and turned if off. I then drew 6 lines. I move lines 2, 4 and 6 to the new layer and ran the command. It erased the objects, and purged the layer out of the drawing. Don't know if it's a fluke or not.