Jump to content

Recommended Posts

Posted

Per a thread someone posted about having issues with Select Similar.

 

Nothing special. I was killing time last night (finished my book and wasn't sure what to read next) and I thought I'd scratch this out for the less fortunate...

 

(defun c:SelectSimilar (/ ss lst)
 ;; Select Similar for those that don't have it
 ;; Alan J. Thompson, 07.06.10
 (vl-load-com)
 (if (setq ss (ssget))
   ((lambda (i / e ent)
      (while (setq e (ssname ss (setq i (1+ i))))
        (setq ent (entget e))
        (setq lst
               (cons (append '((-4 . "<AND"))
                             (vl-remove nil
                                        (mapcar (function
                                                  (lambda (n / p)
                                                    (if (setq p (assoc n ent))
                                                      (if (eq "*" (substr (cdr p) 1 1))
                                                        (cons n (strcat "`" (cdr p)))
                                                        p
                                                      )
                                                    )
                                                  )
                                                )
                                                '(0 2 
                                        )
                             )
                             '((-4 . "AND>"))
                     )
                     lst
               )
        )
      )
      (sssetfirst
        nil
        (setq ss (ssget "_X"
                        (append '((-4 . "<OR"))
                                (apply (function append) lst)
                                '((-4 . "OR>"))
                        )
                 )
        )
      )
    )
     -1
   )
 )
 (princ)
)

  • 4 weeks later...
Posted

Your the man! way to be on top of it...AutoDesk should give you a job!

Posted
Your the man! way to be on top of it...AutoDesk should give you a job!
Enjoy. Glad it will help someone.
Posted

Nice Work, And now it is avaliable in Autocad 2011

 

Regards,

Posted

Nice one! Thanks for thinking of us

Posted
Nice Work, And now it is avaliable in Autocad 2011

 

Regards,

Thanks. It's pretty much always been available in the vertical options, and I think you can get it for 2010 in you are on subscription.

 

Nice one! Thanks for thinking of us
Thanks and you're welcome. As I said, I was killing time. I'll never use it (Civil 3D has it built in), but I wanted to help those running older versions of CAD.
  • 1 month later...
  • 2 months later...
Posted

I take it there is no way of doing anything similar for us paupers who only have LT is there? At the moment I have to use the Qselect option which is time consuming when you have 100+ blocks and colleagues who use weird block names :ouch:

Posted
I take it there is no way of doing anything similar for us paupers who only have LT is there? At the moment I have to use the Qselect option which is time consuming when you have 100+ blocks and colleagues who use weird block names :ouch:

Not without some kind of LT addon.

  • 2 years later...
Posted

Thank you for you time!! Is very easy...thanks again.....

  • 5 years later...
Posted

Hi there,


Sorry for necro bumping this thread but does anyone have a version of this in C# or VB.Net?

 

Thanks,

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...