明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
12
返回列表 发新帖
楼主: yxp

[源码] 发两个带过滤及亮显等功能的 entsel 函数

[复制链接]
发表于 2016-10-22 10:01 | 显示全部楼层
  1. ;;功能:带提示、关键字、过滤表、选择错误时的提示并且会亮显所选对像的entsel
  2. ;;用法:(entselEx  提示信息 过滤表)
  3. ;;举例:(entselEx  "\r请选择一个圆:" '((0 . "circle")) )
  4. (defun entselEx (msg fil / el ss)
  5.         (while (and (setvar "errno" 0)
  6.                                          (not (and (setq el  (entsel msg))
  7.                                                                         (if (= (type el) 'str)
  8.                                                                                 el
  9.                                                                                 (if (setq ss (ssget (cadr el) fil))
  10.                                                                                         ss
  11.                                                                                         (progn (princ ermsg) (setq ss nil))
  12.                                                                                 );if
  13.                                                                         );if
  14.                                                                 );and
  15.                                          );not
  16.                                          (/= (getvar "errno") 52)
  17.                                  );and
  18.   );while
  19.   (if (= (type el) 'list) (redraw (car el) 3));亮显选中的对像
  20.   el
  21. )
发表于 2018-11-10 13:05 | 显示全部楼层
这个好。刚想自己写个,在这个搜了一下。不错赞一个。
发表于 2022-7-12 16:53 | 显示全部楼层
很好!学习了!
发表于 2022-7-13 07:04 | 显示全部楼层
謝謝樓主的分享!太好用了!收藏備用。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-6-2 08:57 , Processed in 0.132540 second(s), 19 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表