Like many AutoCAD users, tip contributor Jessica Confer likes to work inside of locked model space viewports within layouts.
"For example, there are times when you need to unlock the viewport for repositioning. Here are a couple of functions that allow you to lock and unlock viewports with ease. Use VL to lock viewports and VUL to unlock them."
Viewport Lock – Keyboard Command VL
(defun c:vl (/ vp1)
(setq vp1 (ssget))
(command "mview" "l" "on" vp1 ""))
Viewport Unlock – Keyboard Command VUL
(defun c:vul (/ vp2)
(setq vp2 (ssget))
(command "mview" "l" "off" vp2 ""))
Notes from Cadalyst tip reviewer R.K. McSwain: Locking viewports makes working on drawings much easier, and these two shortcut LISP functions are going to make it even easier for us. Thanks Jennifer.