AutoCAD 2000 Environment Variables (setenv/getenv)¶
Note
Reverse-engineered reference — extracted from official R12–R2005 documentation covering AutoCAD 2000 (R15.0).
Overview¶
In AutoCAD 2000, profile settings that can be set from the command line (no mouse, no dialogs) are called Environment Variables. They are stored in the current profile’s Windows registry hive and survive restarts.
Syntax (always use quotes):
(setenv "VARIABLE_NAME" "value") ; set
(getenv "VARIABLE_NAME") ; read
Some take effect immediately; others require an AutoCAD restart.
Registry location:
HKCU\Software\Autodesk\AutoCAD\R15.0\ACAD-1:409\Profiles\<ProfileName>\...
Check current profile with (getvar "CPROFILE").
Complete Variable List¶
Command Line & History¶
Variable |
Description |
Example |
|---|---|---|
|
Visible command-line rows |
|
|
Total history lines kept |
|
|
Command line background color |
|
|
Command line foreground color |
|
|
Command line font name |
|
|
Command line font height |
|
|
Command line font italic flag |
|
|
Command line font pitch/family |
|
|
Command line font weight |
Classic Interface¶
Variable |
Description |
Example |
|---|---|---|
|
Old R12-style accelerator keys (Ctrl+C = Cancel) |
|
|
Old vertical side screen menu |
|
|
Crosshair size (0–100) |
|
|
Drawing area background color |
|
|
Blips on/off |
|
|
Show tooltips |
|
|
Show scrollbars |
|
|
Show layout tabs |
Paths & Files¶
Variable |
Description |
|---|---|
|
Support file search path |
|
Driver files path |
|
Help file location |
|
Log file location |
|
Configuration file location |
|
Texture maps for rendering |
|
Color books path |
|
Template file path |
|
Printer configuration directory |
|
Plot style sheets directory |
Drawing & Behavior¶
Variable |
Description |
Example |
|---|---|---|
|
Max items in ARRAY command |
|
|
Max hatch lines |
|
|
AutoSave interval |
|
|
Auto-create viewports on new layouts |
|
|
How ObjectARX apps load |
|
|
Attribute dialogs and prompts |
|
|
Beep on input error |
AutoSnap / Polar / Tracking¶
Variable |
Description |
|---|---|
|
AutoSnap master control |
|
AutoSnap marker color |
|
AutoSnap marker size |
|
Show aperture box with AutoSnap |
|
Polar angle increment |
|
Polar distance |
|
Polar tracking mode |
|
Additional polar angles |
|
Tracking vector display |
Other / Legacy¶
ACADALTMENU, ACADDISPLAY, ACADLspAsDoc, ACADMAXMEM, ACADMAXPAGE, ACADPAGEDIR, ACADPLCMD, ACADRESFILE, ACADSERVER, ACADXMEM, AlternativePageSetUpsTemplate, ANSIHatch, ANSILinetype, Anyport, AutomaticPlotLog, AVECFG, AVEFACEDIR, AVEPAGEDIR, AVERDFILE, BmpOutCompression, BNS_MenuLoad
Quick Classic Setup Script¶
Paste at the AutoCAD command line or add to acad.lsp:
(setq classic-settings
'(("CmdVisLines" "5")
("CmdHistLines" "2000")
("AcadClassic" "1")
("CursorSize" "100")
("Background" "0")
("ToolTips" "1")
("Scrollbars" "1")
("MaxArray" "999999")))
(foreach pair classic-settings (setenv (car pair) (cadr pair)))
(princ "\nClassic profile settings applied! Restart AutoCAD.")
Dump All Environment Variables¶
Paste this function at the command line or add to acad.lsp. Type ENVALL to print every known environment variable and its current value:
(defun c:envall ( / vars val)
(princ "\n\n=== AutoCAD 2000 Environment Variables Dump ===")
(setq vars '("CmdVisLines" "CmdHistLines" "AcadClassic" "CursorSize" "Background"
"Blipmode" "ToolTips" "Scrollbars" "ScreenMenu" "MaxArray" "MaxHatch"
"AutomaticSaveMinutes" "ARXDemandLoad" "Attdia" "Attreq" "AlarmOnError"
"ACAD" "ACADHELP" "ACADLOGFILE" "ACADCFG" "TemplatePath" "PrinterConfigDir"
"PrinterStyleSheetDir" "AVEMAPS" "ColorBookLocation" "CmdLine.BackColor"
"CmdLine.ForeColor" "AutoSnapColor" "AutoSnapSize" "CreateViewports"))
(foreach v vars
(if (setq val (getenv v))
(princ (strcat "\n" v " = " val))
(princ (strcat "\n" v " = (not set)"))
)
)
(princ "\n\n=== End of list ===\nType ENVALL anytime to run again.\n")
(princ)
)
setenv vs setvar¶
These are not the same thing:
setenv— Environment Variables stored in the profile registry. Persist across sessions. Control UI chrome, paths, and preferences.setvar— System Variables stored in the drawing or in memory. Control drawing behavior (snap, grid, units, selection modes, etc.). Seecsv.lspfor ~50 setvar calls.
Everything not listed above (snap, grid, units, colors in Options dialog, toolbar positions, etc.) is either a System Variable (setvar) or deeper registry-only settings.
Fallback: Manual Registry Edit¶
If setenv doesn’t stick (e.g., profile issues or an .arg file overriding):
Check current profile:
(getvar "CPROFILE")Edit the registry key at:
HKCU\Software\Autodesk\AutoCAD\R15.0\ACAD-1:409\Profiles\<YourProfile>\Display\CmdVisLines
Set as
REG_DWORDto the desired value (e.g.,5)