Hi All,
I used to have a lisp routine that would allow me to pick one dynamic block and it would select all instances including the blocks that have become anonymous. I can no longer find it. Does anybody know what I'm referring to?
Thanks,
Solved! Go to Solution.
Solved by BlackBox_. Go to Solution.
This should do what you're after:
(vl-load-com) (defun c:FOO (/ ss blockName ss2) (if (setq ss (ssget ":S:E" '((0 . "INSERT")))) (progn (setq blockName (vla-get-effectivename (vlax-ename->vla-object (ssname ss 0)) ) ) (setq ss2 (ssadd)) (vlax-for x (vlax-get (vla-get-activedocument (vlax-get-acad-object)) (if (= 1 (getvar 'cvport)) 'paperspace 'modelspace ) ) (if (and (= "AcDbBlockReference" (vla-get-objectname x)) (= blockName (vla-get-effectivename x)) ) (setq ss2 (ssadd (vlax-vla-object->ename x) ss2)) ) ) (sssetfirst nil ss2) ) ) (princ) )
HTH
"How we think determines what we do, and what we do determines what we get."
@_Tharwat wrote:
If you are working on latest versions like 2012 and up , you can use select similar command , just a guess .
The SELECTSIMILAR Command does work on its own, but does not work from the context menu, particularly when said dynamic block instances have different visibility states (onyl those with the same visibility state are selected).
Cheers
"How we think determines what we do, and what we do determines what we get."
Thank you guys, that's what I needed.
@jonmcfarlandWS wrote:Thank you guys, that's what I needed.
I'm happy to help. :beer:
"How we think determines what we do, and what we do determines what we get."