Z is for Zorr... Zero

How to be level headed. I do not know how it happens (I have a few guesses), but we get entities with non zero Z components in our drawings quite a bit. These wreak havoc when creating 2D drawings because lines begin to have strange measurements and objects will not edit correctly. It is much harder after the fact to try and correct this but there are some methods. Use of AutoCAD's own FLATTEN command is a good place to start. It works pretty good but we have found it doesn't fix everything usually. Entities inside blocks and objects like splines will not flatten. You will have to edit them individually to flatten them. One thing we have done is that since we use quite a few converted 3D drafting files (from Unigraphics), we flatten them before they come into our assemblies. Flattening them before we start using them to snap to is a big help. We try, I repeat try to, not to use the converted 3D ents to draw to but it is a mixed bag. In Mechanical, the Hide function has issues with entities that are not on the same plane so take note. In the meantime, keep calm and keep a flat, err.. level head.


Ejection Button.

Eject all your unused baggage. A long time ago I wrote a purge routine that would purge all nested items. I am reposting to help you "lighten the load"

(defun pp_PurgeAllReport (/ test tpurgd purgd total)
(command "_.LAYER" "M" "0" "")
(setq tpurgd 0)
(setq purgd 2)
(while (>= purgd 2)
(progn (setq purgd 0)
(setvar "cmdecho" 0)
(command "_.purge" "_all" "*")
(while (not (zerop (getvar "cmdactive")))
(command "_y")
(setq purgd (1+ purgd))
(setq tpurgd (1+ tpurgd))
(prompt "\nPurging nested items!")
(princ "\n")
(setq tpurgd (1- tpurgd))
(setq total (cons tpurgd '(items purged)))
(princ total)