motee-z Posted September 21, 2021 Share Posted September 21, 2021 Hello Friends i am looking for lisp to select all objects that have same color (defun c:sire(/ s e) (terpri) (setq s (car (entsel "\nSelect object to select similar by Color and Type :"))) (setq e (entget s)) (sssetfirst nil (ssget "_X" (list (assoc 0 e) (if (setq c (assoc 62 e)) c '(62 . 256)) (cons 410 (getvar 'CTAB))))) ) i have one but this lisp can select all object except arcs or only arcs if you pick arc any help please Quote Link to comment Share on other sites More sharing options...
mhupp Posted September 21, 2021 Share Posted September 21, 2021 Just remove (assoc 0 e) Quote Link to comment Share on other sites More sharing options...
BIGAL Posted September 22, 2021 Share Posted September 22, 2021 (edited) "select all object except arcs or only arcs if you pick arc" this contradicts itself it would be easier to get all objects by color then ask want arcs or not, otherwise you will have to do a second selection if the 1st excludes arcs, so the second uses SSADD to add a selection of [picked arcs. (assoc 0 is the entity type eg "LINE" "CIRCLE" "LWPOLYLINE" etc Edited September 22, 2021 by BIGAL Quote Link to comment Share on other sites More sharing options...
Dadgad Posted September 22, 2021 Share Posted September 22, 2021 (edited) Quick Select maybe? Edited September 22, 2021 by Dadgad Screenshot added Quote Link to comment Share on other sites More sharing options...
Saqib_theleo Posted September 22, 2021 Share Posted September 22, 2021 or see this post, Lisp by Mr. Lee Mac. https://www.cadtutor.net/forum/topic/33539-select-entities-by-color-property/?do=findComment&comment=271964 Quote Link to comment Share on other sites More sharing options...
ronjonp Posted September 22, 2021 Share Posted September 22, 2021 There is also THIS filtered select. Quote Link to comment Share on other sites More sharing options...
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.