teknomatika Posted May 16, 2013 Posted May 16, 2013 (defun c:SBC ( / c d e l ) (if (setq e (car (entsel))) (progn (setq c (cond ( (cdr (assoc 62 (entget e))) ) ( (abs (cdr (assoc 62 (tblsearch "LAYER" (cdr (assoc 8 (entget e))))))) ) ) ) (while (setq d (tblnext "LAYER" (null d))) (if (= c (abs (cdr (assoc 62 d)))) (setq l (cons "," (cons (cdr (assoc 2 d)) l))) ) ) (sssetfirst nil (ssget "_X" (if l (list (cons -4 "<OR") (cons 62 c) (cons -4 "<AND") (cons 62 256) (cons 8 (apply 'strcat (cdr l))) (cons -4 "AND>") (cons -4 "OR>") ) (list (cons 62 c)) ) ) ) ) ) (princ) ) (prompt "\nDigite: SBC") I would appreciate your help to change this excellent routine: I do not feel able to do so. I intend to do the same job, but not globally in the drawing, but only a specific selection. The routine must first allow obtain the desired color, and then filter the selection. Quote
Lee Mac Posted May 16, 2013 Posted May 16, 2013 That looks familiar Remove the "_X" from the ssget expression. Quote
teknomatika Posted May 16, 2013 Author Posted May 16, 2013 That looks familiar Remove the "_X" from the ssget expression. Lee, nice. Tanks again! Quote
alanjt Posted May 16, 2013 Posted May 16, 2013 This filtered selection routine I posted might be of interest: http://www.theswamp.org/index.php?topic=35028.msg402471#msg402471 Quote
alanjt Posted May 16, 2013 Posted May 16, 2013 Nevermind, I see you also step through the layer list for matches, not just on the object level. Quote
teknomatika Posted May 16, 2013 Author Posted May 16, 2013 This filtered selection routine I posted might be of interest: http://www.theswamp.org/index.php?topic=35028.msg402471#msg402471 alanjt, tanks for the atention! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.