Object Selection Filter

farris

Usenet Archive
Joined
Jul 30, 2003
Messages
3
Reaction score
0
I’m trying to find a lisp routine or lisp code that will let you select a particular block that is on multiple layers and has different attribute value(s). For example, Enter block Name…"***" On Layer…"****" with attribute value "***". I want to be able to select only the Block with these filters. AutoCad’s Object selection filter lets you select the Block name, Layer and Attribute Tag but not the Attribute value. Any help would be appreciated.
 
(setq ss (ssget "x" '((0 . "INSERT")(2 . "BLOCKNAME"))))

Bill
 
(setq ss (ssget "X" (list (cons 8 layername)
(cons 0 "INSERT")
(cons 2 blockname)
(cons 66 1) ))) ;;; has attributes

then put the selection inside a (while or a (repeat
and check each block for the specified attribute
value, you might have to loop each insert object
for all its attributes until you encounter a SEQEND

farris said:
I'm trying to find a lisp routine or lisp code that will let you select a particular block that is
on multiple layers and has different attribute value(s). For example, Enter block Name."***" On Layer."****" with attribute value "***". I want to be able to select only the Block with these filters.
 
Sorry, I'm still a little new to lisp routines. I understand how the layer and the block name work to select the objects, but still don't understand how to get the the attribute with a certain text value to be selected.

I'm basically trying to find all the blocks in the drawing with a certain block name,layer name and a certain attribute text value and change it to a different layer.
 

Latest threads

Back
Top