dabingrain 发表于 2016-10-22 10:01:16

;;功能:带提示、关键字、过滤表、选择错误时的提示并且会亮显所选对像的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
)

前生 发表于 2018-11-10 13:05:07

这个好。刚想自己写个,在这个搜了一下。不错赞一个。

guankuiwu 发表于 2022-7-12 16:53:38

很好!学习了!

白色微風1991 发表于 2022-7-13 07:04:21

謝謝樓主的分享!太好用了!收藏備用。

hzyhzjjzh 发表于 2022-7-14 13:32:54

谢谢分享!{:1_1:}
页: 1 [2]
查看完整版本: 发两个带过滤及亮显等功能的 entsel 函数