hildevasco_br Posted September 5, 2023 Posted September 5, 2023 hello I have a file with multiple open polylines that intersect and under some there are blocks. I need to generate boundary based on block insertion point. So that the boundary command does not generate an error, I want to zoom in quickly, keeping the scale of the chosen window in each block, and also, in case the boundary generates an error, change the color of the block. thanks Quote
rlx Posted September 5, 2023 Posted September 5, 2023 ;;; https://www.cadtutor.net/forum/topic/10334-zoom-to-selected-objects/ ;;; Zoom Object[/i] ;;; by Lee McDonnell 08.05.2009[/i] ;;; ARGS:[/i] ;;; ss ~ Selection Set[/i] (vl-load-com) (defun ZmObj (ss / Minp Maxp lst) (foreach Obj (mapcar 'vlax-ename->vla-object (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss)))) (vla-getBoundingBox Obj 'Minp 'Maxp) (setq lst (cons (mapcar 'vlax-safearray->list (list Minp Maxp)) lst))) (vla-ZoomWindow (vlax-get-acad-object) (vlax-3D-point (list (apply 'min (mapcar 'car (mapcar 'car lst))) (apply 'min (mapcar 'cadr (mapcar 'car lst))) 0.0)) (vlax-3D-point (list (apply 'max (mapcar 'car (mapcar 'cadr lst)))(apply 'max (mapcar 'cadr (mapcar 'cadr lst))) 0.0)) ) ) (defun c:t1 () (ZmObj (ssget)) (princ)) (princ "\nType t1 to select & zoom to object(s)") google is your friend (and mine) Quote
j2lstaples Posted September 6, 2023 Posted September 6, 2023 I don't even know if you're trying to get proper help or not so I'll just post a response and wait for more information. 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.