I modified my Acad.lsp file to include the following: Each assumes that the viewports are on layer DefPoints or VPLayer (or layers starting with Def and VP). I think of them as (V)iewport(L)ock, (V)iewport(U)nlock, (V)iewport(F)reeze and (V)iewport(T)haw
;
(DEFUN C:VL () ; Lock all viewports
(COMMAND "LAYER" "THAW" "DEF*,VP*" "")
(COMMAND "MVIEW" "LOCK" "ON" "ALL" "")
(COMMAND "LAYER" "FREEZE" "DEF*,VP*" "")
)
(DEFUN C:VU () ; Unlock all viewports
(COMMAND "LAYER" "THAW" "DEF*,VP*" "")
(COMMAND "MVIEW" "LOCK" "Off" "ALL" "")
(COMMAND "LAYER" "FREEZE" "DEF*,VP*" "")
)
;
(DEFUN C:VT () ; Thaw the viewport layers
(COMMAND "LAYER" "THAW" "DEF*,VP*" "")
)
(DEFUN C:VF () ; Freeze the viewport layers
(COMMAND "LAYER" "FREEZE" "DEF*,VP*" "")
)
;