打桥位lisp_2013-06-05 明经 AutoLISP 编程(102918348) 群聊记录:(vl-load-com)(defun c:rgj () (setq...

ya雀无声 10:40:16

;;功能:带提示、关键字、过滤表、选择错误时的提示并且会亮显所选对像的entsel

;;用法:( clh-entsel  提示信息  关键字  过滤表  选择错误时提示)

;;举例:(clh-entsel  "\n请选择一个圆:"  "A B C"   '((0 . "circle"))  "\n所选对像不符合要求!请重新选择:")

;;说明:过滤表与ssget的过滤表相同;函数由CLH521,2009.6.7参考了一些网上资料整理编写

(defun clh-entsel (msg key fil ermsg / el ss)

(while (and (setvar "errno" 0)

(not (and (setq el (apply '(lambda (msg key) (initget key) (entsel msg)) (list msg key)))

(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

)

;clh-entsel函数完毕========================================================

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值