Jump to content

Recommended Posts

italian

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

Share this post


Link to post
Share on other sites
Dadgad

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

Share this post


Link to post
Share on other sites
SLW210

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

Share this post


Link to post
Share on other sites
benhubel

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

Share this post


Link to post
Share on other sites
Dadgad
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:

Share this post


Link to post
Share on other sites
Arizona
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.

Share this post


Link to post
Share on other sites
rkent
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×