See the top rated post in this thread. Click here

Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Selectsimilar with a defined area?

  1. #1
    AUGI Addict Mr Cory's Avatar
    Join Date
    2007-01
    Location
    Under a Rock over there
    Posts
    1,006
    Login to Give a bone
    0

    Default Selectsimilar with a defined area?

    Hi everyone,

    Does anyone know of or if its possible to select an object, specify an area and then run selectsimilar within that area? So that similar objects that are out of the region arnt selected?

    Much appriciated!

  2. #2
    I could stop if I wanted to kpblc2000's Avatar
    Join Date
    2006-09
    Posts
    212
    Login to Give a bone
    2

    Default Re: Selectsimilar with a defined area?

    How will you determine "a similar object(s)"? A very simple example is to use (ssget) filters like this:
    Code:
    (defun c:selsim (/ selset ent res enttype)
      (vl-load-com)
      (if
        (and (not (vl-catch-all-error-p
                    (vl-catch-all-apply
                      '(lambda ()
                         (setq ent (car (entsel "\nSelect an entity <Cancel> : ")))
                         ) ;_ end of lambda
                      ) ;_ end of vl-catch-all-apply
                    ) ;_ end of vl-catch-all-error-p
                  ) ;_ end of not
             ent
             (not (vl-catch-all-error-p
                    (vl-catch-all-apply
                      '(lambda ()
                         (setq selset (ssget (list (assoc 0 (entget ent)))))
                         ) ;_ end of lambda
                      ) ;_ end of vl-catch-all-apply
                    ) ;_ end of vl-catch-all-error-p
                  ) ;_ end of not
             selset
             ) ;_ end of and
         (sssetfirst selset selset)
         ) ;_ end of if
      ) ;_ end of defun
    And so on.

  3. #3
    AUGI Addict Mr Cory's Avatar
    Join Date
    2007-01
    Location
    Under a Rock over there
    Posts
    1,006
    Login to Give a bone
    0

    Default Re: Selectsimilar with a defined area?

    Hmm, thats very cool! Thanks alot!

  4. #4
    Past Vice President / AUGI Volunteer peter's Avatar
    Join Date
    2000-09
    Location
    Honolulu HI
    Posts
    1,106
    Login to Give a bone
    0

    Default Re: Selectsimilar with a defined area?

    In a single statement


    (ssget (list (cons 0 (cdr (assoc 0 (entget (car (entsel "\nSelect Object: "))))))))

    Will allow you to select an entity like for example a line and then when you select other objects it will only allow you to select lines.

    Peter

  5. #5
    I could stop if I wanted to kpblc2000's Avatar
    Join Date
    2006-09
    Posts
    212
    Login to Give a bone
    0

    Default Re: Selectsimilar with a defined area?

    > Peter: Try to press <Esc> button during selecting object in my code and in your code.

  6. #6
    Active Member
    Join Date
    2002-06
    Posts
    95
    Login to Give a bone
    0

    Default Re: Selectsimilar with a defined area?

    It's probably worth pointing out that selectsimilar only seems to be available in vertical products - Civil3D has had it for a while. I know vanilla 2007 and LT 2008 don't have it.

    Basically you can grab any object and use selectsimilar to select all objects of the same type on the same layer. It's a great quick alternative to qselect, but completely inflexible and not in any help files that I can find.

  7. #7
    AUGI Addict Mr Cory's Avatar
    Join Date
    2007-01
    Location
    Under a Rock over there
    Posts
    1,006
    Login to Give a bone
    0

    Default Re: Selectsimilar with a defined area?

    Yeah im using ADT/ACA my first thoughts were using that command but defining the area for it to look but that didnt really work out, the solution posted above works perfect (for what i need it for anyway )

  8. #8
    Certifiable AUGI Addict
    Join Date
    2015-11
    Location
    Jo'burg SA
    Posts
    4,512
    Login to Give a bone
    0

    Default Re: Selectsimilar with a defined area?

    Here's one which allows you to select what properties to compare. It doesn't use a defined area, but rather selects from a selection set - so you can select an area by crossing or fence if you so wish.
    Attached Files Attached Files

  9. #9
    Member
    Join Date
    2007-04
    Location
    Cincinnati
    Posts
    36
    Login to Give a bone
    0

    Default Re: Selectsimilar with a defined area?

    Quote Originally Posted by irneb View Post
    Here's one which allows you to select what properties to compare. It doesn't use a defined area, but rather selects from a selection set - so you can select an area by crossing or fence if you so wish.
    how does this work once it's loaded. i tried "selsim" but it doesn't do anything - sorry, this is my first attempt at a lisp routine

    ok...think i figured it out. load the application into autocad. type lsp then "command" type the command then it's loaded and will work. correct?

    hmmm...still having difficulty. had it once

    anyways, what do you do with the selection set? can't figure out how to filter it. sorry for being a noob.
    Last edited by mark.momper; 2008-02-26 at 03:39 PM.

  10. #10
    All AUGI, all the time CAB2k's Avatar
    Join Date
    2016-01
    Location
    Brandon, Florida
    Posts
    687
    Login to Give a bone
    0

    Default Re: Selectsimilar with a defined area?

    Load lisp & enter selsimilar at the command line.

Page 1 of 2 12 LastLast

Similar Threads

  1. Walls defined as families with user defined parameters
    By J-G in forum Revit Architecture - Wish List
    Replies: 3
    Last Post: 2021-04-01, 12:53 PM
  2. selectsimilar in certaion area
    By Wish List System in forum AutoCAD Wish List
    Replies: 1
    Last Post: 2013-03-20, 09:14 PM
  3. Isolate objects within user defined area
    By autocad.wishlist1734 in forum AutoCAD Wish List
    Replies: 1
    Last Post: 2013-01-16, 04:54 AM
  4. 2008: selectsimilar command?
    By jastect in forum AutoCAD LT - General
    Replies: 5
    Last Post: 2012-03-23, 02:58 PM
  5. User defined area
    By Kbosch.184344 in forum Revit Architecture - General
    Replies: 1
    Last Post: 2008-07-02, 12:05 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
  •