Copy the code to the text area of the AutoCAD editor (either the command line or the script editing window). Press "Enter" to define the Lock_all_layers function. Type the function name ...