For those looking to expand on Jack's idea, check out Layer and Command, Menu Combination Tool (Tip #1998) by Steve Johnson. This is a cool menu programming tool. Instead of swapping layers around in the menu, Steve combined the Layer command with your choice of standard AutoCAD commands. He supplies two command functions in the laycmd.lsp file. LAYCMD and the expanded LAYCMDS request a layer name and then a command. The command starts, and once again the CMDACTIVE system variable is demonstrated as the LISP function waits for the command to complete before restoring the active layer. |