Lee Mac Posted January 17, 2011 Posted January 17, 2011 Maybe something along these lines: ;; ZoomText © Lee Mac 2011 (defun c:ZoomText ( / ss ac l p1 p2 x ) (vl-load-com) (if (ssget "_X" (list (cons 0 "TEXT,MTEXT") (cons 1 (strcat "*" (vl-list->string (apply 'append (mapcar (function (lambda ( c ) (if (vl-position c '(35 64 46 42 63 126 91 123 44 96)) (list 96 c) (list c) ) ) ) (vl-string->list (getstring t "\nSpecify Text to Search for <All> : ") ) ) ) ) "*" ) ) ) ) (progn (vlax-for o (setq ss (vla-get-ActiveSelectionSet (vla-get-ActiveDocument (setq ac (vlax-get-acad-object)) ) ) ) (setq l (cons (cons o (mapcar 'vlax-safearray->list (progn (vla-getBoundingBox o 'p1 'p2) (list p1 p2) ) ) ) l ) ) ) (vla-delete ss) (while (setq x (car l)) (vla-ZoomCenter ac (vlax-3D-point (apply 'mapcar (cons '(lambda ( a b ) (/ (+ a b) 2.)) (cdr x)))) 1.0) (vla-ZoomScaled ac [b][color=red]0.01[/color][/b] acZoomScaledRelativePSpace) (initget "Next Exit") (setq l (if (eq "Exit" (getkword "\nZoom to Next Object? [Next/Exit] <Next> : ")) nil (cdr l)) ) ) ) (princ "\n** None Found **") ) (princ) ) I'm not sure whether the figure marked in red needs to be 0.01 or 100.0 however... Quote
dchilders Posted January 17, 2011 Posted January 17, 2011 Awesome, I can't thank you enough. What a time saver:D Quote
Lee Mac Posted January 17, 2011 Posted January 17, 2011 Awesome, I can't thank you enough. What a time saver:D You're very welcome Quote
funkkybebel Posted October 18, 2017 Posted October 18, 2017 Hi, is this possible to add other items, like ATTRIBUTES, MLEADERS etc... to the search ? Quote
Recommended Posts
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.