(defun c:tn(/ ts th1 txt pt newtxt atxt)
;->*error* start
(defun *error* (msg)(princ “error: “)(princ msg)
(setvar “osmode” os)
(princ))
;-<*error* end
(setq os (getvar “osmode”))
(setq ts (getvar “textsize”))
(if (not th) (setq th ts))
(setq th1 (getreal (strcat “n글자 높이는 <” (rtos th) “>:”)))
(setq atxt (getstring “n첨두문자는<없으면 엔터>:”))
(if (= atxt nil) (setq atxt “”))
(setq txt (getint “n 시작할 번호:”))
(if th1 (setq th th1))
(setq pt (getpoint “n지시선 시작점 클릭:”))
(while pt
(setq pt1 (getpoint pt “n표식 위치 클릭:”))
(command “undo” “be”)
(setvar “osmode” 0)
(command “donut” 0 (/ th 1.5) pt “”)
(setq ss1 (ssadd))
(command “line” pt pt1 “”)
(ssadd (entlast) ss1)
(command “polygon” 6 pt1 “i” (/ th 0.91))
(command “trim” (entlast) “”)
(command (list (ssname ss1 0) pt1))
(command “”)
(setq newtxt (strcat atxt (rtos txt 2 0)))
(command “text” “j” “m” pt1 th 0 newtxt “”)
(command “undo” “e”)
(setq txt (1+ txt))
(setvar “osmode” os)
(setq pt (getpoint “n삽입점을 클릭하시오:”))
);while
(setvar “osmode” os)
(princ)
);defun
예전에 여기서 받은 리습이었는데
폴리곤 대신 원으로 부탁좀 드립니다..