Can also put these into a routine:
(command "-layer" "ON" "ListofLayers, EachLayerSeperated, Withcomma" "") ; Turns layer ON.. try 'OFF'
(command "-layer" "FREEZE" "ListofLayers, EachLayerSeperated, Withcomma" "") ; Freezes layer, ty 'Thaw' as well
For completion:
(command "-layer" "SET" "LayerName" "") ; Sets current layer
MHUPPs probably runs faster (like milliseconds) and a nice option to choose the layer, my ideas maybe better if the layer names are set and can be hard coded into the routine... but useless if each drawing / project uses a different name