Results 1 to 7 of 7

Thread: select similar entity with color

  1. #1
    Member
    Join Date
    2012-06
    Posts
    13
    Login to Give a bone
    0

    Default select similar entity with color

    Hello
    I need help to get a routine that can select all entity that have same color and same entity type
    thank you

  2. #2
    All AUGI, all the time
    Join Date
    2010-06
    Posts
    962
    Login to Give a bone
    0

    Default Re: select similar entity with color

    Hi,

    Example to select all objects with Bylayer color which is equal to 256 and you can change the number to suit your needs.

    Code:
    (ssget "_X" '((62 . 256)))

  3. #3
    Member
    Join Date
    2012-06
    Posts
    13
    Login to Give a bone
    0

    Default Re: select similar entity with color

    thank you tharwat
    i want to pick object then get its color and type then filter all objects have same color and type

  4. #4
    All AUGI, all the time
    Join Date
    2010-06
    Posts
    962
    Login to Give a bone
    0

    Default Re: select similar entity with color

    Hi,

    Something like this?
    Code:
    (if (and (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)))))
             )
      )

  5. #5
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,658
    Login to Give a bone
    0

    Default Re: select similar entity with color

    Consider using the SSX (Express Tool) http://help.autodesk.com/view/ACD/20...4-909C2760A23F
    You may need to pick and enter to remove extra filters like [Entity] and [Layer], but it's a really useful tool for selecting similar objects.

    The commands:
    Quick Select http://help.autodesk.com/view/ACD/20...4-F61DACF5C300
    Selectsimilar http://help.autodesk.com/view/ACD/20...7-05AFBAA7C29F
    and Filter http://help.autodesk.com/view/ACD/20...F-180E039AA984
    can all do this as well.

  6. #6
    Member
    Join Date
    2012-06
    Posts
    13
    Login to Give a bone
    0

    Default Re: select similar entity with color

    Thank you Tharwat that is okay and helpful

    - - - Updated - - -

    Thank you Tharwat it is helpful

    - - - Updated - - -

    Thank you Tharwat it is helpful

  7. #7
    All AUGI, all the time
    Join Date
    2010-06
    Posts
    962
    Login to Give a bone
    0

    Default Re: select similar entity with color

    You are welcome anytime Motee.

    Please ask if you stuck with any issue.

Similar Threads

  1. Select Similar Command
    By autocad.wishlist1734 in forum AutoCAD Wish List
    Replies: 2
    Last Post: 2013-11-27, 04:20 AM
  2. 2011: Select similar
    By Mr Cory in forum ACA General
    Replies: 9
    Last Post: 2010-04-24, 11:21 PM
  3. Select Offset entity
    By Coolmo in forum VBA/COM Interop
    Replies: 4
    Last Post: 2006-12-13, 07:12 PM
  4. how to select an entity through program
    By sudhakary_infotech in forum Revit - API
    Replies: 3
    Last Post: 2005-06-18, 01:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •