||||
>예전에 블럭 이름 바꾸기 리습 여기서 다운 받은거 같은데 없네요..
>
>혹시 가지고 계신분 있나요??
(defun c:???(/ os ent elist ins)
    (setvar "cmdecho" 0)
    (setq os (getvar "osmode"))
    (if (setq ent (car (entsel "\nBlock select:")))
      (progn (setq elist (entget ent))
        (setq obn (cdr (assoc 2 elist)))
        (setq ins (cdr (assoc 10 elist)))
        (setq rname nil)

        (while (= rname nil)
          (setq rname (getstring t "\nNew block name:"))
          (setq byn (assoc 2 (tblsearch "block" rname)))
          (setq byn2 (cdr byn)) ; byn2 블럭이름
          (if (= rname byn2)
            (progn (setq rname nil)
               (prompt "블럭이름중복->다시입력해주세요")
            ) ;progn
          );if
        ) ;while

        (if (/= rname "")
          (progn (command "explode" ent)
            (setvar "osmode" 0)
            (command "_.block" rname ins "P" "")
            (command "_.insert" rname ins "" "" "")
            (setvar "osmode" os)
          (princ "블록이름: ")(princ obn)(princ " --> ")(princ rname)(princ " 로 교체함")
          );progn
        );if
      );progn
     );if
(princ)
);defun