- (defun c:text (/ osmode_bak ss e getss)
- (defun getss (e / ss)
- (setq ss (ssadd))
- (while (setq e (entnext e))
- (setq ss (ssadd e ss))
- )
- ss
- )
- (setvar "CMDECHO" 0);_关闭命令提示
- (Setq osmode_bak (getvar "osmode"));_记录捕捉
- (Setvar "osmode" 0);_关闭捕捉
- (setq ss (ssget))
- (setq e(entlast))
- (command ".region" ss "")
- (command ".union" (getss e) "")
- (setq e(entlast))
- (command ".Explode" (entlast))
- (if (= 0 (getvar "peditaccept"))(setvar "peditaccept" 1))
- (command "_.pedit" "m" (getss e) "" "j" "0.005" "")
- (Setvar "osmode" osmode_bak);_还原捕捉
- (setvar "CMDECHO" 1);_打开命令提示
- (princ)
- )
|