The BRUTE FORCE METHOD to "Flatten a drawing that has Z coordinates"
Lisp code is copied from post #7 :
https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/flatten-drawing/m-p/848243#M73901
How to use:
-open new document in notepad,
-copy/paste following code
-save file, for example as: Flatten4.lsp
-SAVE THE DRAWING THAT IS CURRENTLY OPPENED !!!
-load lisp in to AutoCAD
-type command: Flatten4
-load lisp in to AutoCAD
-type command: Flatten4
(defun C:Flatten4 (/ ssFlat)
(setq ssFlat (ssget))
(if ssFlat
(progn
(setvar "Highlight" 0)
(command "._move" "_si" ssFlat "*0,0,1e99" ""
"._move" "_si" ssFlat "*0,0,-1e99" "")
(setvar "Highlight" 1)))
(princ)
(if ssFlat
(progn
(setvar "Highlight" 0)
(command "._move" "_si" ssFlat "*0,0,1e99" ""
"._move" "_si" ssFlat "*0,0,-1e99" "")
(setvar "Highlight" 1)))
(princ)
Nema komentara:
Objavi komentar
Comment