Try purge.
Registered forum members do not see this ad.
I am trying to tidy up some drawing by deleting layers. I have deleted all the object in the layer but still get this error.
Untitled.jpg
What do I need to do?
Try purge.
Yogi Berra: "In theory there is no difference between theory and practice. In practice there is."
Unless you are using an ancient version of AutoCAD, look up and use LAYDEL and/or LAYMRG commands.




The "Layers containing objects" is the one that is probably the problem. An example you can have a block that exists in the dwg database but you have not inserted it anywhere, hence use Purge. Also CIV3d will not allow layer deletes if its connected to a style, but in 2013 you can remove un used styles then purge. I can see AC2012 but if drawing has proxy objects this problem will occur.
A man who never made mistakes never made anything
One of the "objects" that can prevent layer deletion is a block definition closer. When you define a block, the objects are added to the block table, along with one phantom object at the end to close the definition. That closer object always goes on the current layer. If you're not careful when you define a block, or you borrow a block from somewhere else, that layer is arbitrary, that is, you don't know what it is, and there's no way to find out what it is. That's why I always define blocks with layer 0 current.
I'm not sure what happens when you use LAYDEL in that situation. The closer might get moved to the current layer, or to 0, or to some other layer. With AutoCAD there's no telling. If I had time I'd figure it out. If I had more time I'd write some code to manage the layers of block definition closers.
breaking AutoCAD on a regular basis since 1991
Cyber: I don't think it matters what layer the block is created on when it comes to using LAYDEL. The block and the layer it was created on will both be deleted.
"I have only come here seeking knowledge. Things they wouldn't teach me of in college." The Police
Eat brains...gain more knowledge!
Registered forum members do not see this ad.
Here's a link to an Autodesk docs page:
http://docs.autodesk.com/ACD/2013/EN...ber=d30e579828
The key phrase there is "Block definitions begin with a block entity and end with an endblk subentity." If you export a drawing to DXF format, you'll find an ENDBLK entity in each block definition, and that entity has a layer assigned to it.
I am not making this up. I once had a layer that I couldn't purge, and I made it my mission in life to purge it. I looked into block definitions and found some info on ENDBLK. I found that if I could purge a particular block, then I could purge the offending layer. I redefined the block on a different layer and voila, the layer would purge.
I've never seen a block removed by the LAYDEL command. Just now, for fun, I put all the entities in a block on one layer and then used LAYDEL to remove that layer. The block wasn't removed, but as you might expect, it lost all its entities.
breaking AutoCAD on a regular basis since 1991
Bookmarks