Hurricane for Autodesk® AutoCAD®
Last updated: September 25, 2026
Short answer: start the line with a semicolon (
;). AutoCAD skips any line in a script file whose first character is a semicolon.Example
;Batch cleanup script ;Zoom to extents ZOOM E ;Purge everything unused, with no prompts -PURGE A * N ;End of scriptRules for comments in AutoCAD scripts
- The semicolon must be the first character on the line. Put each comment on its own line, above the command it describes.
- Don't add a comment after a command on the same line. AutoCAD reads the whole line as input, so
ZOOM ;zoom outsends ";zoom" and "out" to the ZOOM prompt and the rest of the script goes out of step.- Comment lines can go anywhere else: at the top as a header, between commands, or at the end.
3 script gotchas that silently break batch runs
- A blank line is an Enter. At the Command prompt, Enter repeats the last command. Use a comment line, not an empty line, to space out your script.
- A space is an Enter too. Invisible trailing spaces at the end of a line send extra Enters. Check for them when a script gets out of step.
- End the last line with a line break. If the file stops right after the last command, that command may not run.
Commented scripts are easier to reuse. Hurricane runs the same script on hundreds of drawings, unattended. Download the free trial.
Related: AutoCAD Commands List (which commands are safe in scripts) | AutoCAD System Variables List (FILEDIA, CMDECHO and other script settings) | AutoCAD Batch Scripting Cheat Sheet