Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have this lisp that freezes all layers in a 5"x5" viewport then thaws Floor plan layer on each page layout. But its seems to not want to switch between the page layouts... It goes to the first and then to the last.
(defun C:KPL ; = Key Plan Layers (/ layout vpss n found vpdata) (foreach layout (layoutlist) (setvar 'ctab layout) (setq vpss (ssget "_X" (list '(0 . "VIEWPORT") (cons 410 (getvar 'ctab)))) ; find all Viewports in this Layout n (sslength vpss) found nil ); setq (while (not found) (setq vpdata (entget (ssname vpss (setq n (1- n))))) (if (and (equal (cdr (assoc 40 vpdata)) 5.0 0.05) (equal (cdr (assoc 41 vpdata)) 5.0 0.05) ); and (setq found T); then -- stop (while) loop ); if ); while (command "_.mspace") ; in case it's currently in Paper Space [which won't allow next line] (setvar 'cvport (cdr (assoc 69 vpdata))); make that one current (command "_.vplayer" "_freeze" "*" "" "_thaw" "FLOOR PLAN,0" "" "") ; freeze all Layers except those two in the current Viewport ); foreach (princ) ); defun
Solved! Go to Solution.