Jump to content

Recommended Posts

Hello all, real newbie here..

My first question is: AutoCad 2016 (student ver.) is there a possible way of selecting one line (property RED) and then have a command that could select all the lines in model space that have the color RED??

 

Could it be done with using any of: linetype/lineweight/line color

 

***IF WHILE IN MODEL SPACE EVERYTHING IS ONLY "LAYER 0"***....meaning I didnt use the layer properties

 

what if the RED lines are a block? Can I SELECT one block and then USING a SELECTION TOOL it could select all the blocks??

 

 

NOW 18:53- I WILL BE HERE UNTIL TOMORROW NO LATER THEN 09:00 PLEASE HELP ME

Edited by italian
Link to comment
Share on other sites

Welcome to CADTutor. :)

 

The command you want is SELECTSIMILAR.

Follow the commandline prompts.

You will need to use the SEttings option to define the object types which you are looking for.

If you were trying to select specific blocks you would want to use the NAME option.

select similar results.jpg

selectsimilar settings dialog.jpg

Link to comment
Share on other sites

There is a similar post that was made a while back in the AutoLISP section. Because we are currently in the Beginners' Area, I will assume that you aren't familiar with LISP. Simply follow the instructions below:

 

Begin by following this brief tutorial to load the code http://www.lee-mac.com/runlisp.html.

After loading it, type SelectByColour to start the code, then click on an object of the color you want.

 

;Code posted by Lee Mac to [url]http://www.cadtutor.net/forum/showthread.php?62842-Select-entities-by-color-property[/url].
(defun c:SelectByColour ( / 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)
)

 

If you have any problems, let me know, or you can try to summon the almighty Lee Mac by mentioning his name somewhere in your reply. I think it's some sort of dark ritual that conjures him to the mortal plane :o.

 

**Edit**

When clicking to choose a color, you can select a block, however be aware that it will select by the color assigned to the block even if there aren't any objects of that color within the block. It will ignore the colors within.

Edited by benhubel
Added note
Link to comment
Share on other sites

SELECTSIMILAR or QSELECT should work, you may also want to look into filters for future work.

 

I always forget about QSELECT, as I have never really needed it, nor integrated it into my work flow, and it is so much more user friendly than the old FILTER command. :beer:

Link to comment
Share on other sites

  • 3 weeks later...
I always forget about QSELECT, as I have never really needed it, nor integrated it into my work flow, and it is so much more user friendly than the old FILTER command. :beer:
Filter has it's uses. If you have more than one criteria you want to base your selection on, filter works great, although the learning curve on Filter is a little steep. Once I figured out How to work it properly, it's wonderful.

QSelect seems to only be able to select based on One criteria.

Link to comment
Share on other sites

Filter has it's uses. If you have more than one criteria you want to base your selection on, filter works great, although the learning curve on Filter is a little steep. Once I figured out How to work it properly, it's wonderful.

QSelect seems to only be able to select based on One criteria.

 

Qselect can be used for more than one criteria by first going through to select one type of object, hit enter to start it back up, pick the box at the lower left for append to previous, pick another type of object, and go from there.

 

I use it when I need Text and Mtext, as a common example.

 

Filter is more powerful, no question.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...