Find/Delete Empty Layers?

Discussion of MicroSurvey CAD related issues and questions.

Moderators: Brian Sloman, Jason Poitras, James Johnston

Post Reply
Alex Leonard
Posts: 42
Joined: Sat May 13, 2006 7:47 pm
Location: Kona, Hawaii

Find/Delete Empty Layers?

Post by Alex Leonard » Fri Aug 17, 2007 6:22 pm

Is there an easy way to identify if a layer is empty (has no entities)?
Alternatively, can one produce a list of layers with summary data about a layer (e.g. its default settings and including the number of entities stored within it)?
How about automating the finding and deleting all empty layers in a drawing?

You see I have this drawing that was passed on to me with about 100 layers - I need information from only a subset of the area encompassed by the drawing so I cropped down to what I need. But now I have a bunch of empty layers that used to contain entities from the cropped-out portions of the drawing - I need to figure which layers have my stuff and which are blank...


Richard Sands
Posts: 425
Joined: Mon Feb 14, 2005 1:10 pm
Location: Tasmania


Post by Richard Sands » Fri Aug 17, 2007 6:52 pm

Not sure about this - its often a dilemma I face. Graphics packages actually give the layer contents.
Have you used the PURGE comand?
Help says -'Cleans the drawing file of unused drawing elements. Use Purge to remove blocks, layers, linetypes, text styles, or dimension styles that you have defined but are not using in the drawing. Purging can significantly reduce the drawing file size.'

If I really need to be sure there's nothing in that layer I isolate it - ie make it current and draw anything on it, then ISOLATE Layer.
Then 'EDIT/ Select All' and see what MSCAD reports - how many entities selected.
Thats tedious for many layers.
In cases like your '100 layers ' drawing, I just ISOLATE only the Layers I want open and copy all entities to a new DWG.

Glen Cameron
Posts: 1395
Joined: Fri Nov 08, 2002 12:18 pm
Location: Corbeil, Ontario, Canada

Check Layer Conversion routine

Post by Glen Cameron » Sat Aug 18, 2007 10:34 am

The PURGE comand is the only tool that allows you to get rid of layers that have nothing on them. It will not touch any layers that have anythng on them. It will not get rid of the current layer, even if it is empty, so make sure the current layer is one with something on it. you can also not purge layer 0, as it must be in every drawing.

There is a great little command that allows you to see the contents of each layer, one at a time, and allow you to move entities from that layer to another (in case they are on the wrong layer). Go under the MsTools menu | Layer Control | Mass Layer Conversion | Check Layer Conversion. It allows you to go through each layer one at a time, to see what is on that layer - similar to the Isolate routine, but much quicker.

Glen W. Cameron, C.E.T.
City of North Bay, Ontario

Alex Leonard
Posts: 42
Joined: Sat May 13, 2006 7:47 pm
Location: Kona, Hawaii

Post by Alex Leonard » Sun Aug 19, 2007 9:47 am

Thanks guys!
Purge did excatly what I needed - got rid of the empty layers (and a bunch of blocks too) and shrunk file size considerably - thereby increasing performance... :P

Post Reply