试试这个:
- ;;----------------------------------------------------------------------------;;
- ;; Condence Drawing to one layer
- (defun C:OOF (/ SS)
- (setq SS (ssget "_X" '((410 . "Model")))) ;select everything in model space
- ;change selection set SS to current layer and color to bylayer
- (vl-cmdf "_Chprop" SS "" "LA" (getvar 'clayer) "C" "Bylayer" "")
- (repeat 3 (vl-cmdf "_.Purge" "A" "*" "N")) ;purge 3 times
- (princ)
- )
|