핸드레일 리습인데요 2007번전이라 그런지 작동이 안되는데요 2007에서 가능한 버전 으로 부탁드립니다.
(defun c:hrail (/ x y z q dy h m xx xs xp dq hz i
fl cl tl ul ml)
(while (or (not x) (not (< 4 x 240))) (initget 7) (setq x (getdist "nOverall Width S-S ( 4-240 ): "))) (initget 6) (setq y (getdist "nHeight T-B <42>: ")) (or y (setq y 42.)) (initget 6) (setq z (getdist "nTube Size <1.5>: ")) (or z (setq z 1.5)) (setq dq (cond ((<= x 50) 0) (T (fix (/ x 42))))) (initget 4) (setq q (getint (strcat "nMiddle Upright Qty <" (itoa dq) ">: "))) (or q (setq q dq)) (setq dy (* (- y z) 0.5)) (setq h (getdist (strcat "nMid Rail Height <" (rtos dy 2 2) ">: "))) (or h (setq h dy)) (initget 1 "Mild Stainless") (setq m (getkword "nMaterial - Mild/Stainless: ")) ;;;HALF TUBE (setq hz (* z 0.5)) ;;;UPRIGHT SPACING (setq xx (- x z) xs (/ xx (1+ q)) xp hz) ;;;CENTER LINE LIST (setq cl (list hz)) (repeat q (setq cl (cons (+ xp xs) cl) xp (+ xp xs))) (setq cl (cons (- x hz) cl)) (setq cl (reverse cl)) ;;;MAIN FRAME LIST (setq fl (list (list (car cl) 0 0) (list (car cl) (- y hz) 0) (list (last cl) (- y hz) 0) (list (last cl) 0 0))) ;;;UPRIGHT LIST (setq i 1) (repeat q (setq ul (cons (list (list (nth i cl) 0 0) (list (nth i cl) (- y z) 0)) ul)) (setq i (1+ i))) ;;;MID SUPPORTS (setq tl cl) (while (> (length tl) 1) (setq ml (cons (list (list (+ (car tl) hz) h 0) (list (- (cadr tl) hz) h 0)) ml)) (setq tl (cdr tl))) (setvar "CMDECHO" 1) (setvar "TRACEWID" z) (setvar "THICKNESS" z) (setvar "SNAPMODE" 0) (command "_.UCS" "_W") (command "_.TRACE" "") (foreach v fl (command v)) (command "") (foreach v ml (command "_.TRACE" "") (command (car v)) (command (cadr v)) (command "")) (foreach v ul (command "_.TRACE" "") (command (car v)) (command (cadr v)) (command "")) (prin1))
64비트 2008 작동은 합니다 (다른 사람리습을 연구목적이 아니라면 구지(이것도 맞고 “굳이”도 맞음.)구문해석의 즐거움을 거부할 경우도 많습니다..)