Print Page | Close Window

lisp for finding block

Printed From: CAD Forum
Category: EN
Forum Name: AutoCAD
Forum Description: Discussion about AutoCAD and AutoCAD LT, viewers, DWG and DWF formats, Design Review, AutoCAD 360, add-ons
URL: https://www.cadforum.cz/forum_en/forum_posts.asp?TID=5686
Printed Date: 01.Jun.2026 at 00:08


Topic: lisp for finding block
Posted By: RMCGARRIE
Subject: lisp for finding block
Date Posted: 12.Apr.2011 at 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

-------------
ryan mcgarrie CAD OP



Replies:
Posted By: John Connor
Date Posted: 12.Apr.2011 at 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)
)


-------------
"Humans have a strength that cannot be measured. This is John Connor. If you are reading this, you are the resistance."

<<AutoCAD 2015>>




Print Page | Close Window