ronjonp 发表于 2022-7-5 16:30:15

I'm confused .. it works here.

(sssetfirst nil (filter_set "U00025" "TEXT1" 1101 1106))
This is looking at the attribute 'TEXT1' and it grabs the blocks with 1102, 1104, & 1106 ( all within your range and even )

pmxcad 发表于 2022-7-5 16:36:45

see post 10

ronjonp 发表于 2022-7-5 16:40:44

 
LOL I meant read post 4. Guess I should have said MY post updated above. Glad that's sorted!
 
If you want to look at ranges for multiple attributes, you could use something like this:

(defun filter_set (blk tags lo hi / iseven ss v) (defun iseven (x) (zerop (rem x 2))) (vl-load-com) (if (setq ss (ssget "_X" (list (cons 0 "INSERT") (cons 2 blk) (cons 66 1))))   (foreach blk (mapcar 'cadr (ssnamex ss))   (foreach att (vlax-invoke (vlax-ename->vla-object blk) 'getattributes)(and (member (vla-get-tagstring att) tags)   (or (not (
页: 1 [2]
查看完整版本: 仅具有偶数属性的块