Exchange Forum > AutoLISP and Visual LISP
Convert all 3d points to 0
Convert all 3d points to 0

#1

sanj
Join Date:
09-23-2008
Hi,
 
Is it possible to convert all lines to 0 in the Z axis? I have be given a drawing that contains lines where some of endpoints vary in the Z axis.
 
Thanks in advance!
Convert all 3d points to 0

#2

alanjt
Join Date:
04-05-2008
Quote:
Hi, 
  
Is it possible to convert all lines to 0 in the Z axis? I have be given a drawing that contains lines where some of
endpoints vary in the Z axis. 
  
Thanks in advance!
"flatten" is an express tool.
Convert all 3d points to 0

#3

Russell
Join Date:
07-31-2007
Hi Alan,
I was checking through my archives and came across this version of MakeZ0. I'm not sure if it does all that the Express tools Flatten does, but you can test it out an see if it does.
Russell
 
Code:
(defun c:MoveZ0 (/ Objects)
  (princ "\nSelect objects to move Z to 0")
  (if (setq Objects (ssget))
    (progn
      (command "_undo" "_begin")
      (command "_move" "_si" Objects "*0,0,1e99" "")
      (command "_move" "_si" Objects "*0,0,-1e99" "")
      (command "_undo" "_end")
    )
  )
  (princ)
)