Display full version of the post: lisp for finding block

RMCGARRIE
12.04.2011, 10:29
does anybody know of a lisp that can zoom to a block using the handle code. i already know how to get each handle code i just need to know how to zoom to the block. i am using 2011 cad. hope somebody can help?

ry

John Connor
12.04.2011, 11:45
I found this small lisp routine at the AutoDesk Discussion Forums.  It was submitted by leprofca on 03-22-2007.  I have not used it so I cannot tell you if it works or not.
 
(defun C:HANDLE ( / handle ent )(setq handle (getstring "\nEnter handle to search for: "))(setq ent (handent handle))(if ent(progn ;line added(sssetfirst nil (ssadd ent))(command "_zoom" "_Object");line added);line added;Else(ALERT "The handle you entered does not exist in this drawing!"))(princ))