I actually find a block in a drawing with :
(setq ss (ssget "_X" '((2 . "blockname"))))
But I want the blockname to be a variable.
So I want to do :
(setq a "blockname") and then
(setq ss (ssget "_X" '((2 . a)))).
But this do not work. I tries : (list a), (setq a) but that doesn't work either
thanks
variable filter-list item
-
- Posts: 166
- Joined: Sun Nov 28, 2010 4:21 pm
Re: variable filter-list item
Because you are using single-quote (') your A symbol is not being evaluated.
Try using back-quote instead:
Try using back-quote instead:
Code: Select all
(setq ss (ssget "_X" `((2 . ,a)))).
Re: variable filter-list item
A version without backquote would look like:
Code: Select all
(setq ss (ssget "_X" (list (cons 2 a))))
Re: variable filter-list item
Thanks Edgar, that work