![]() |
【转帖】过滤器如何使用扩展数据
过滤器如何使用扩展数据
www.dimcax.com 过滤器如何使用扩展数据 (defun c:sxd (/) (vl-load-com) (while (not (setq ent1 (car (entsel))))) (setq obj1 (vlax-ename->vla-object ent1)) (setq xtype nil xdata nil ) (setq list1 (list '(1001 . "apsm") '(1000 . "rrr"))) (foreach n list1 (setq xtype (cons (car n) xtype))) (foreach n list1 (setq xdata (cons (cdr n) xdata))) (setq xtype1 (vlax-make-safearray vlax-vbinteger (cons 0 (1- (length list1))))) (vlax-safearray-fill xtype1 (reverse xtype)) (setq xdata1 (vlax-make-safearray vlax-vbvariant (cons 0 (1- (length list1))))) (vlax-safearray-fill xdata1 (reverse xdata)) (vla-setxdata obj1 xtype1 xdata1) ) (setq ss1 (ssget "x" '( (-3 ("apsm" (1000 . "rrr")) )))) 我使用sxd给各种对象附加扩展数据,但在后面使用过滤器时却无法选择上circle,line,blockreference等对象,只能选择上lwpolyline,若取消(1000 . "rrr") 则可以,请教是怎么会事? ******************* e_mail : siebeneagle@yahoo.com.cn msn : siebeneagle@hotmail.com 关注 时间非常宝贵 不少浪费在无意义的事情上 d re(ssget "x"(list(append(list -3)(list(list "apsm"))))) d (foreach n list1 (setq xtype (cons (car n) xtype))),n是什么? ---------初学者 d re liu22737 : 我想增加(1000 . "rrr")这个项或其他项啊! re gyxzzza : n 是list1 表里的一个元素,在此是'(1001 . "apsm")和 '(1000 . "rrr") 过滤器是不是只能用到扩展数据的注册应用程序这一项? ******************* e_mail : siebeneagle@yahoo.com.cn msn : siebeneagle@hotmail.com 我也要知道,困扰了好多天了,哪位高人指点一下,楼主弄明白了没? |
所有的时间均为北京时间。 现在的时间是 09:34 AM. |