Search the Community
Showing results for tags 'zaxis'.
-
lisp Move and Snap point to a 3D line in Z plane
Meenu posted a topic in AutoLISP, Visual LISP & DCL
Hi, I have a point on a 3D line's exact alignment , although the Z value of the point is 0. Can anyone help me with a lisp program to snap this point on the 3D line thus acquiring z value of the point. I have around 20000 points like this that need to be snapped and z value to be extracted. Thanks in advance. -
I've tried several different ways to insert a block at a specific z point and have the hardest time doing so. I would like the x & Y to be where the getpoint is but the z to be at an elevation of 2332.5 or 194'-4.5" Any help welcome... (defun C:*5 ( / ol ev ln pt1 pt2 x y z ) (setq ol(getvar "clayer")) (setq ev (getvar "elevation")) (command "layer" "s" "ALO" "") (command "elevation" "2332.5") (setq pt1 (getpoint "\nChoose a point : ")) (setq x (car pt1)) (setq y (cadr pt1)) (setq z (2332.5)) (setq pt2 (list x y z)) (command "_.-insert" "d:/CAD_BLOCKS/ALO.dwg" "_non" pt2 "" "" "") (setvar "clayer" ol) ;;;(setvar "elevation" ev) (princ) ) then I tried (defun C:*5 ( / ol uc ln pt1 pt2 x y z ) (setq ol(getvar "clayer")) (setq uc (getvar "ucs")) (command "layer" "s" "ALO" "") (command "UCS" "W" "UCS" "NEW" "0,0,194'-4.5") (setq pt1 (getpoint "\nChoose a point : ")) (setq x (car pt1)) (setq y (cadr pt1)) (setq z (caddr 0)) (setq pt2 (list x y z)) (command "_.-insert" "d:/CAD_BLOCKS/ALO.dwg" "_non" pt2 "" "" "") (setvar "clayer" ol) ;;;(setvar "ucs" uc) (princ) ) Thanks in advance