samifox Posted February 6, 2011 Posted February 6, 2011 Hi i want to select all lines colored with red. qselect is not working sometimes. filter is to detailed for this simple task. what is the fastest way to select object by color? Thanks Shay Quote
ReMark Posted February 6, 2011 Posted February 6, 2011 QSelect in my opinion is still the fastest. Quote
tzframpton Posted February 6, 2011 Posted February 6, 2011 FILTER to me is the fastest because you can save a Selection Filter for future use so you don't have to keep going through the same procedure of selecting the necessary parameters. Unless, of course, you create a LISP routine. No pun intended Mark. You still my boy, blue. Quote
CyberAngel Posted February 7, 2011 Posted February 7, 2011 When does QSelect work and when does it not work? That should tell you why it won't do what you want. The difficulty, I suspect, is that you have some lines that are red because they are on a red layer (or layers) and have the color ByLayer, and you may have other lines that are explicitly assigned the color red. Unless (as StykFacE pointed out) you have a filter defined for this task, you can't select all those items at once. I'm curious: why do you need to select everything that is a particular color? If it's a plotting issue, you can adjust the color table. Quote
SLW210 Posted February 7, 2011 Posted February 7, 2011 (edited) FILTER to me is the fastest because you can save a Selection Filter for future use so you don't have to keep going through the same procedure of selecting the necessary parameters. Unless, of course, you create a LISP routine. Filter would be great. Pretty sure you should be able to locate a LISP already that can do this, probably at Cadcorner or Cadalyst. More importantly you should try to determine the cause of Qselect not working. Edited February 7, 2011 by SLW210 Quote
khoshravan Posted July 27, 2012 Posted July 27, 2012 Cadalyst TIP #1046 Select by color. http://cadtips.cadalyst.com/node/tiplisting?keywords=tip%20#1046 I couldn't find tip #1046 in above site. Quote
ReMark Posted July 27, 2012 Posted July 27, 2012 You got to know how to do it. Try this link: http://cadtips.cadalyst.com/misc-user-tools/select-color Quote
khoshravan Posted July 27, 2012 Posted July 27, 2012 You got to know how to do it. Try this link: http://cadtips.cadalyst.com/misc-user-tools/select-color Thanks your link reached the page. I searched but no result were found. Quote
ReMark Posted July 27, 2012 Posted July 27, 2012 So you downloaded the lisp routine and tried it out? The key was to search on TIP1046.lsp. Quote
BlackBox Posted July 27, 2012 Posted July 27, 2012 I agree completely that both FILTER and QSELECT are the most robust options, but given the specificity of the OP's request, for fun: SelectBySS (defun c:SelectBySS (/ ss color) (if (and (princ "\nSelect object to select all by color: ") (setq ss (ssget ":S:E" '((-4 . "<NOT") (62 . 256) (-4 . "NOT>"))) ) (setq color (cdr (assoc 62 (entget (ssname ss 0))))) ) (sssetfirst nil (ssget "_x" (list (cons 62 color)))) (prompt "\n** Nothing selected ** ") ) (princ) ) SelectByColor (defun c:SelectByColor (/ color ss) (if (and (princ "\nSelect objects by color: ") (setq color (acad_colordlg (atoi (getvar 'cecolor)) T)) (setq ss (ssget "_x" (list (cons 62 color)))) ) (sssetfirst nil ss) (prompt "\n** Nothing selected ** ") ) (princ) ) Quote
khoshravan Posted July 28, 2012 Posted July 28, 2012 So you downloaded the lisp routine and tried it out? The key was to search on TIP1046.lsp. I downloaded it but I didn't know it is a LISP routine. No I haven't used it and am not sure if I will, as I am not used to LISP. Quote
Dadgad Posted July 28, 2012 Posted July 28, 2012 I downloaded it but I didn't know it is a LISP routine. No I haven't used it and am not sure if I will, as I am not used to LISP. There is a world of difference between WRITING a lisp, and using one. You use lisp all the time, within the program now. The EXPRESS TOOLS are mostly lisp programs, which you run by clicking on an icon, or entering a shortcall for it. There is no reason to be gun-shy of USING them, they will save you lots of time and work. Click on this link to Lee Mac's explanation of how to use them. Once you have read the first two little bits you will understand how to do it, and use any lisp program. After you see how easy it is, and how incredibly useful they are, go back to Lee's site and take a look at all of his wonderful lisp programs which he very generously makes available for free download there. Thanks Lee! Quote
khoshravan Posted July 28, 2012 Posted July 28, 2012 There is a world of difference between WRITING a lisp, and using one.You use lisp all the time, within the program now. The EXPRESS TOOLS are mostly lisp programs, which you run by clicking on an icon, or entering a shortcall for it. There is no reason to be gun-shy of USING them, they will save you lots of time and work. Click on this link to Lee Mac's explanation of how to use them. Once you have read the first two little bits you will understand how to do it, and use any lisp program. After you see how easy it is, and how incredibly useful they are, go back to Lee's site and take a look at all of his wonderful lisp programs which he very generously makes available for free download there. Thanks Lee! Dear Dadgad Thanks for your warm and supportive reply. You have encouraged me to go forward LISP. :)I am aware of its importance and benefit but I thought I am little old for studying it. But with your email I will definitely will dive into it. Thanks a lot. PS) This reply is one of the best replies I have ever got in this forum. Quote
ReMark Posted July 28, 2012 Posted July 28, 2012 You do not have to know how to write lisp to use it just as you do not have to know how an internal combustion engine works to drive a car. 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.