Message 1 of 5
Paper space View Port Inactive & Zoom Extents All Sheets?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello all,
The attach routine Locks All view ports in all sheets upon startup. In addition to this I would like to have all view ports inactive and possibly zoom extents for each sheet.
Nearly every drawing has all sheets arbitrarily zoomed into an area and a view port is active an often unlocked.
;;;VPLOCK.lsp locks all viewports automatically when opening a drawing
;;;no idea who wrote it
(defun vplock (yesno / ss lock x obj)
(vl-load-com)
(if (setq ss (ssget "X" '((0 . "VIEWPORT")(-4 . "/=")(69 . 1))))
(progn
(if (= "y" yesno) (setq lock :vlax-true)(setq lock :vlax-false))
(setq x 0)
(while (< x (sslength ss))
(setq obj (vlax-ename->vla-object (ssname ss x)))
(vla-put-displaylocked obj lock)
(setq x (1+ x))
)
)
)
(princ)
)
(vplock "y")
Please mark Accept as Solution if your question is answered. Kudos gladly accepted. ⇘