;;; Program check if the drawing is 2D or 3D and if is 3D transform it to 2D
;;; Based on idea from http://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/2d-or-3d-drawing/m-p/6023023#U6023023
;;; Modified by Igal Averbuh 2016

(defun FLT ()
(command "_.UCS" "")
(command "_.move" "_all" "" '(0 0 1e99) ""
"_.move" "_p" "" '(0 0 -1e99) "")

(command "_.change" "all" "" "p" "t" "0" "" )
(princ)
)

(defun c:3dt ()
(setq dr (getvar "dwgname"))
(setq a (getvar "EXTMAX"))
(setq pt1 (caddr a))
(if (= pt1 0)
(princ "\n2D Drawing")
(flt)
)
(princ)
)
(c:3dt)

Advertisements