- ;;功能:带提示、关键字、过滤表、选择错误时的提示并且会亮显所选对像的entsel
- ;;用法:(entselEx 提示信息 过滤表)
- ;;举例:(entselEx "\r请选择一个圆:" '((0 . "circle")) )
- (defun entselEx (msg fil / el ss)
- (while (and (setvar "errno" 0)
- (not (and (setq el (entsel msg))
- (if (= (type el) 'str)
- el
- (if (setq ss (ssget (cadr el) fil))
- ss
- (progn (princ ermsg) (setq ss nil))
- );if
- );if
- );and
- );not
- (/= (getvar "errno") 52)
- );and
- );while
- (if (= (type el) 'list) (redraw (car el) 3));亮显选中的对像
- el
- )
|