(defun c:nn(/ p1 name1 objs ent a ss no)
(setq p1 (getpoint "请点选将统计的块:"))
(setq name1 (ssname (ssget p1) 0))
(setq ent (entget name1))
;;(princ ent)
(setq a (cdr (assoc 2 ent))) ;将目标的块名字提取出来
(princ "\n框住需要统计的范围:")
(setq ss (ssget (list(cons 0 "INSERT")(cons 2 a)))) ;框选范围内的同名字块
(if (= ss nil) ;;
(setq no 0)
(setq no (sslength ss))
) ;;
(princ "\n 图块《")
(princ a)(princ "》数量为: ")
(princ no)(princ " 只")(princ)
)
(princ "\n\t 统计图块命令,设计者:刘珽锋 欢迎使用!")
(princ "\n\t 请输入命令:NN ")
(princ)
正文
通过鼠标操作统计块的数量2006-05-15 10:27:00
【评论】 【打印】 【字体:大 中 小】 本文链接:http://blog.pfan.cn/otot/14092.html
阅读(3363) | 评论(0)
版权声明:编程爱好者网站为此博客服务提供商,如本文牵涉到版权问题,编程爱好者网站不承担相关责任,如有版权问题请直接与本文作者联系解决。谢谢!
评论