;;畫中心線程式
(defun c:ted4(/ v CEN os)
(setvar "cmdecho" 0)
(setq v (getvar "clayer"))
(setq OS(getvar "OSMODE"))
(setvar "osmode" 4)
(setq r1 r)
(setq cen (getpoint "選取中心點:"))(terpri)
(cond ((= CEN nil)(setvar "OSMODE" OS)))
(prompt "中心線拉出長度<")(princ r)(prompt ">:")(setq r (getdist cen))(terpri)
(cond ((= r nil)(setq r r1)))
(cond ((> r 1)
(setvar "CLAYER" "中心線")
(setvar "OSMODE" 0)
(command "LINE" (list (car CEN) (- (cadr CEN) r))
(list (car CEN) (+ (cadr CEN) r)) "")
(command "LINE" (list (- (car CEN) r) (cadr CEN))
(list (+ (car CEN) r) (cadr CEN)) "")
(setvar "OSMODE" OS)
(setvar "CLAYER" V)
(princ)
)))
沒有留言:
張貼留言