[Search tip detail and code files using keywords, tip number, author name, etc ]
    For tip to function correctly, you must ensure that the downloaded file name matches the file name
    displayed in the Rename File To field. Please rename downloaded files when necessary.
Lock and Unlock Viewports
Tip# 3427 By Theodorus Winata On 15-May-2010
Rated By 1 users Downloaded : 1843
Categories : Viewports
Software type : AutoCAD 2011
Rename File To : LV.LSP
With one command, lock all the viewports in your drawing.

Theodorus's tip allows you to lock or unlock all viewports with one quick command. Load the LISP file and start the command by entering LV at the Command line. The command will ask you if you want to lock the viewports, with a default answer of Yes. If you respond with Yes, every viewport in your drawing will be locked. If you respond with No, all viewports will be unlocked. This routine includes a good example of using a separate function where certain chunks of code must be called repetitively from different locations in the main function. Thanks, Theodorus.


Average Rating:

User comments
Comment by Fisher,R
Posted on 2010-07-26 13:35:18
We have some drawings with over 100 layouts, and multiple viewports per tab. To lock every viewport on every layout tab, at the command line key in "mview", then "lock", then at the "Viewport View Locking" prompt, key in "On". When it asks for a selection, type in "ALL", then enter. This locks every viewport in the drawing.
Comment by McSwain,R.K.
Posted on 2014-06-01 17:31:27
Regarding the comment from R. Fisher: The Mview command works for all viewports on the current layout, but not all viewports on all layouts. Tested in AutoCAD 2015