; Flatten a 3D drawing ; Written by Lee Mac (http://www.lee-mac.com/) ; This script will set all z values to zero, efectively flattening any 3D drawing. ; (defun c:flat ( / doc org ) (setq doc (vla-get-activedocument (vlax-get-acad-object)) org (vlax-3D-point 0 0 0) ) (vlax-for blk (vla-get-blocks doc) (if (= :vlax-false (vla-get-isxref blk)) (vlax-for obj blk (if (vlax-write-enabled-p obj) (foreach elv '(1e99 -1e99) (vla-move obj org (vlax-3D-point 0 0 elv))) ) ) ) ) (vla-regen doc acallviewports) (princ) ) (vl-load-com) (princ)