1 / 1/ 1/ 1/
이렇게 있을경우
2 / 2/ 2/ 2/
이런식으로 일괄 변경되는 LISP 인데요 잘안되요.ㅠ.ㅠ
조언부탁드려요~
(defun C:TC()
(setq old (ssget))
(setq typ (strcase (getstring “Change text
A)ngle, H)eight, W)idth, S)tyle, IP)oint: “)))(terpri)
(setq co -1)
(setq t2 “T”)
(cond
((= “H” typ)
(setq x 40)
(setq ht (getreal “New height: “))(terpri)
)
((= “A” typ)
(setq x 50)
(setq ht (* pi (/ (getreal “New angle: “) 180.0)))(terpri)
)
((= “W” typ)
(setq x 41)
(setq ht (getreal “New width: “))(terpri)
)
((= “S” typ)
(setq x 7)
(setq ht (getstring “New style: “))(terpri)
)
((= “IP” typ)
(setq x 72)
(setq ht (getreal “New Insert point: “))(terpri)
)
)
(while (boundp ‘t2)
(progn
(setq co (1+ co))
(setq temp (entget (ssname old co)))
(setq oldht (assoc x temp))
(setq newht (cons x ht))
(setq newtext (subst newht oldht temp))
(setq t2 (ssname old (1+ co)))
(entmod newtext)
)
)
(setq temp “FINISHED”)
)
(defun val (ent x)
(cdr (assoc x (entget ent)))
)