再次改进!!谢谢谢谢- (defun c:rrt ( / en_data i strl tmps txt txt_list txt_list2)
- (setq en_data (entget (car (entsel "select:"))))
- (setq txt_list (assoc 1 en_data))
- (setq txt (cdr txt_list))
- (setq strl (strlen txt)
- i strl
- tmps ""
- )
- (while (> i 0)
- (if (> (ascii (substr txt i 1)) 127)
- (setq tmps (strcat tmps (substr txt (1- i) 2))
- i (- i 2)
- )
- (setq tmps (strcat tmps (substr txt i 1))
- i (1- i)
- )
- )
- )
- (setq txt_list2 (cons 1 tmps))
- (setq en_data (subst txt_list2 txt_list en_data))
- (entmod en_data)
- (prin1)
- )
|