Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

deleting empty layers

Status
Not open for further replies.

witz2

Technical User
Oct 9, 2003
7
US
Can someone explain, in simple terms, why some layers cannot be deleted or purged? If there are no visible objects on a layer, why can't the layer be deleted if it is a layer that you created yourself?

Can layers be hidden on the layer manager if they cannot be deleted?

 
witz2,

Somewhere within your drawing, there are blocks defined which may have embedded layers - this is one cause.

The other possibility is your drawing has become corrupt.

HTH

Todd
 
Thank you Todd. I figured there might be references to that layer that I could not see. Is there any way to find out what these references are and modify them so that the layer can be deleted or is it impossible? (I was on a temp assignment last week and the boss wanted me to delete a number of layers and many of them could not be deleted. I told him there were probably xrefs or blocks or something that depended on that layer. He asked me, "couldn't I find out what is referenced and get rid of it?") I didn't really know how to explain to him that it probably couldn't be done. Perhaps I should have just hidden the layers that could not be deleted. Having alot of layers that have no objects on them that you are not using can look sloppy and be confusing. I haven't figured out the best remedy for this and I'm wondering how other people deal with it. Any suggestions???
 
witz2,

The only way I know to do this is to check each block/xref manually, or through code; either VB/VBA or LISP, I have a VBA routine that forces all entities within a block to Layer 0, but doesn't do Xrefs, and it isn't perfect - but you're welcome to it if you like.

Todd
 
Wit2z,

Did you try to W-block out the drawing? That usually helps too.
If you type in purge. Then go to view items that you cannot purge. Next, click on the layer that you want to purge. The text box on the bottom give you hints. Like:

"This layer cannot be purged if it contains objects"
"This layer cannot be purged because it is the current layer."

I hope this helps.

Crash
 
A trick I've learned from years of CAD use. Thaw all layers and turn all layers on. Window everything and copy/clip it(or copy with base point). Enter the Erase command and type ALL when it asks you to select objects. Hit enter to erase everything in the drawing (barring paper space). NOW purge everything in your drawing. Purge several times as certain layer are block dpendant until the block is removed. Paste your drawing information back in and you should be in a cleaner state than you were before. It might not get everything but it will make your file smaller and should clear up some of your layer issues. It also removes some of those code artifacts that can cause drawings to become corrupt or stop them from working correctly.

There are some add-on programs out there that offer a layer/color clean to strip all of your blocks to layer 0/bylayer color and then return the block to the layer it was on. The program I use is ToolPack from
it is a product that has so many tools I haven't even touched them all in the last year since I started working with it. For $300-500 It might be worth looking at.
 
Thank you Durnel!!!!!!!!!
I am a pass-by viewer and have same problem and read your article above, it works perfect!!!!.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top