本帖最后由 作者 于 2004-1-28 14:13:44 编辑
不用写那么多行 - ;;(xentsel) = 带提示和过滤表的entsel (ssget "p" f)方法.精简代码!---------------------------------------------BY 无痕
- ;;调用:(XENTSEL "\n选择直线或圆..." '((0 . "*LINE,CIRCLE")))
- ;;循环选则直到选中符合过滤的实体为止(defun xentsel (msg filter)
- (while (not (and (setq el (entsel msg)) (ssget "p" filter))))
- el
- );;调用:(XENTSEL1 "\n选择直线或圆..." '((0 . "*LINE,CIRCLE")))
- ;;只选一次,返回点表 (实体名 . 点位);选不中或空选返回nil.(defun xentsel1 (msg filter)
- (if (and (setq el (entsel msg)) (ssget "p" filter)) el nil)
- )
|