- (defun c:uni (/ osmode_bak ss e getss);UNI后转换为PLINE
- (defun getss (e / ss)
- (setq ss (ssadd))
- (while (setq e (entnext e))
- (setq ss (ssadd e ss))
- );while
- 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)
- ) ;if
- (command "_.pedit" "m" (getss e) "" "j" "0.005" "")
- (Setvar "osmode" osmode_bak)
- (setvar "CMDECHO" 1)
- (princ)
- )
|