For locking layers, unlocking layers, etc, I use the attached lisp file. After it is loaded the commands available are:
DOLS - Delete Objects on Layer Selected
LK - lock a layer with pick
LKA - lock all with pick except layer picked
LNP - Layer "No Plot" for layer picked
LP - Layer "Plot On" for layer picked
LKX - Lock all Xrefs
UX - Unlock all Xrefs
UA - Unlock all layers except Xrefs
LC - Lock all layers except Current layer
ULK - Unlock layer picked