 - (defun c:tt ( / ss)
- (initget 128 "aa bb cc")
- (setq key (getkword
- "\n>>>请选择:[aa/bb/cc]"
- )
- )
- (if (not key)
- (setq key "aa")
- )
- (cond
- ((= key "aa")
- (while
- (if
- (null (setq ss (ssget '((0 . "*text")(1 . "*%%130*,*%%131*,*%%132*")))))
- (progn
- (alert "\n没有选择到任何对象!")
- t
- )
- (progn
- (command "erase" ss "")
- nil
- )
- )
- )
- )
- ((= key "bb")
- (while
- (if
- (null (setq ss (ssget '((0 . "*text")(1 . "*l*),*l*)")))))
- (progn
- (alert "\n没有选择到任何对象!")
- t
- )
- (progn
- (command "chprop" ss "" "c" "1" "")
- (setvar "cmdecho" 1)
- nil
- )
- )
- )
- )
- ((= key "cc")
- (while
- (if
- (null (setq ss (ssget '((0 . "*text")(1 . "???x???,???x???,(*)")))))
- (progn
- (alert "\n没有选择到任何对象!")
- t
- )
- (progn
- (command "chprop" ss "" "c" "6" "")
- (setvar "cmdecho" 6)
- nil
- )
- )
- )
- )
- (t nil)
- )
- (princ)
- )
|