zintonio
Guest
Hello.
I have a problem that I'm trying to solve but I can't go any further because my lisp language knowledge is miserable.
then I would like to create a function that allows me to select all the blocks present in a drawing by clicking on one. I tried to do this:
(defunc c:all (/n name sel )
; select all put blocks that have the name equal to the selected block.
(setq n (car(entsel "select block:")))
(setq name (cdr(assoc 2)))
(setq sel (ssget "_x" (cons 2 name))))
)
I am having little results, my goal is to:
1. write as command: all;
2. select the block;
3. all the blocks present in the drawing are selected;
all this comes from the fact that I found myself in front of drawings where there are blocks on unsuitable layers. Of course you will tell me there is the funz _qselect but it is too ruddy to use x that you have to remember the name of the block. what I would like to accomplish is something simple (command:all --> select the block --> fine)
Thank you.
I have a problem that I'm trying to solve but I can't go any further because my lisp language knowledge is miserable.
then I would like to create a function that allows me to select all the blocks present in a drawing by clicking on one. I tried to do this:
(defunc c:all (/n name sel )
; select all put blocks that have the name equal to the selected block.
(setq n (car(entsel "select block:")))
(setq name (cdr(assoc 2)))
(setq sel (ssget "_x" (cons 2 name))))
)
I am having little results, my goal is to:
1. write as command: all;
2. select the block;
3. all the blocks present in the drawing are selected;
all this comes from the fact that I found myself in front of drawings where there are blocks on unsuitable layers. Of course you will tell me there is the funz _qselect but it is too ruddy to use x that you have to remember the name of the block. what I would like to accomplish is something simple (command:all --> select the block --> fine)
Thank you.