Hurricane for Autodesk® AutoCAD®
Three layer jobs come up again and again on the forum, and all three are scriptable through Hurricane: clearing junk layer filters, selecting everything on one layer, and setting layer states (on/off/freeze/lock) across many drawings.
-LAYER-LAYER is the no-dialog version of the Layer command. Its options cover everything a script needs — Make, Set, New, On, OFf, Freeze, Thaw, LOck, Unlock, COlor, and more. For example, to freeze a layer and turn another off:
-LAYER F ; Freeze DEFPOINTS ; layer name (wildcards allowed, e.g. XREF*) OFF DIM* ; turn off every layer starting with DIM ; (Enter) exit the command
Inherited drawings often carry dozens of nested layer filters that clutter the Layer Manager. The catch: most "delete filters" routines prompt, and a prompt stalls an unattended batch. The Hurricane forum hosts a no-prompt version that just removes them all:
delfiltersall.lsp from Delete all Layer Filters on the Hurricane Forum — a script-safe build that deletes every layer filter with no questions asked.
There's no native command-line "select by layer", but the classic SSX (Selection Set by example) routine does it, and is handy inside scripts. The forum has a copy since Autodesk dropped it after R14:
SSX.zip from Selecting by layer in a script (SSX). A no-LISP workaround also works: -LAYER Lock every layer except the target, then SELECT ALL — locked layers are skipped.