Layer0 and Defpoints . Post 11 in series “AutoCAD Cleanup”

Layer 0 and Defpoints layers are special. These layers should not to be used to create graphic content. Layer 0 should be used only to create block definitions, Defpoints layer is used by AutoCAD to create invisible definition points for other elements. These layers behave in a special way: they cannot be deleted and fall flat into the corresponding layer of a parent file when the file containing these layers is attached or overlaid to another file.

Example: A-Plan.dwg is a construction plan with walls drawn on layer 0 and M-Plan.dwg is a piping plan with hot water pipes drawn on its layer 0. A-Plan.dwg is overlaid into M-Plan.dwg to be used as a background. You want to see/plot walls as thin lines and pipes as thick lines. However you cannot separate layer 0 of parent M-Plan.dwg .dwg and A-Plan.dwg

The Defpoints layer behaves in a similar way. On earlier versions of AutoCAD many users learned to use the Defpoints layer as storage for elements they did not wish to plot (viewports, alignment lines, sometimes XREFs and such). However starting from AutoCAD 2000, any layer can have the non-plot property, and it is a good practice to create a special layer(s) to contain those elements.

It is best to start with cleaning up Layer 0 and Defpoints.

I wrote a little LISP routine to move all objects from Layer 0 to a new layer “from0”. After it is loaded, you can run it by typing “from0”at the command line.

(defun c:from0 ()
 (setq ssl0 (ssget “x” ‘((8 . “0″))))
 (COMMAND “-layer” “N” “from0″ “”)
 (COMMAND “chprop” ssl0 “” “la” “from0″ “”)
 )

You can also run it on multiple files using ScriptPro

However if you have graphic elements on the Defpoins layer, or do not want to dump everything from layer 0 into one layer, you will have to do it manually.

To identify objects on these layers, you can use LAYWALK (Express Tools in earlier releases). I will not duplicate the HELP file of LAYWALK here but suffice it to say that it is the most powerful tool for diagnosing layer problems and sorting them out. It can answer two questions:

  • What layers the objects are on?
  • What objects reside on these layers?

laywalk2

Undocumented trick: you can use your mouse wheel to ZOOM while in LAYWALK. Just click on Select by element, and wheel forward to zoom in, wheel back to zoom out, double click on a wheel to zoom extents, or press and drag to pan. When done navigating, press Escape to return to LAYWALK without change. Explore right-click menu.