How to Remove Invisible / non-selectable Data in a DWG


You have a drawing that has some issues.  This can be slow opening, slow regens, constant crashing or the file size seems large for what you can see in the drawing.


This problem can sometimes be cured by removing all non-selectable or invisible data in the drawing.


  1. Open the file (generally start with the XREF’s and work your way back to the DWG that has the XREF’s inserted.
  2. Go to the Model Space tab
  3. Type in LAYON and LAYTHW
    This will turn on and thaw all layers
  4. Make sure no layers are locked
  5. If you are using Civil3D, please ensure that all C3D objects are set to display something (so anything that is set to No_Diplay or the display elements are all off in a style - such as a surface, point style, profile, etc.) Failure to do this will result in Civil 3D elements being erased.
  6. Do a ZOOM => Extents to make sure all visible objects are on the screen. 

    Typically, I will also do a ZOOM => .5x to zoom out 50%
  7. Now start the ERASE command and when prompted to Select Objects, type in the word ALL

    That will tell you what is selected in Model Space

    Now type in the letter R or RE to start the Remove from selection, and using a window, select the visible items on the screen:

    As you can see from the RED box above, in this example there is nothing left to erase (it’s a clean model space), however in your drawings there is remnants and left over stuff that can be erased.  In the example below, this is a drawing that has issues, and there are 100 objects in Model Space that cannot be seen or selected (except via the ALL):

    You can now hit Enter or space to erase those objects
  8. Now type in PURGE, and right mouse click on the BLOCKS heading and select PURGE to purge all the BLOCKS that are not used in the DWG:
  9. Now, type in -PURGE (with a minus sign)
    (This is the command line purge, the only way you can get to the Registered Applications)
    1. Type in RE, Regapps, or select Regapps
    2. Hit enter at this prompt
    3. Type or Select No at this prompt:
    4. Normally you should have 20 or less, if this list gets large, it will impact the drawing performance

Now that we’ve done all of that, type in LAYERP and hit enter (this will restore the previous later state – the LAYTHW, unless you had to unlock layers).  Simply hit Enter again to run the command again.  That should get you back to where you started the process.

About the Author

Ryan Wunderlich

Sr. Technical Support Specialist<br><br>An AutoCAD Certified Professional, Ryan is responsible for taking client cases and assisting with issues with the software - everything from regular glitches to software deployments and whatever else goes wrong. He's proficient in AutoCAD (including customization), VBA, LISP, and Civil 3D.

Follow on Linkedin More Content by Ryan Wunderlich
Previous Article
Error “The drawing cannot be migrated” when opening or working in AutoCAD Mechanical
Error “The drawing cannot be migrated” when opening or working in AutoCAD Mechanical

The standards in this drawing are corrupted. When you go to the AM:Standards Tab in Options The standard tr...

Next Article
What is the best way to convert a CADWorx spec file into Plant 3D?
What is the best way to convert a CADWorx spec file into Plant 3D?

What files are required from CADWorx to import a spec into AutoCAD Plant 3D?