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

CmdVisLines

Visible command-line rows

(setenv "CmdVisLines" "6")

CmdHistLines

Total history lines kept

(setenv "CmdHistLines" "2000")

CmdLine.BackColor

Command line background color

CmdLine.ForeColor

Command line foreground color

CmdLine.FontFace

Command line font name

CmdLine.FontHeight

Command line font height

CmdLine.FontItalic

Command line font italic flag

CmdLine.FontPitchAndFamily

Command line font pitch/family

CmdLine.FontWeight

Command line font weight

Classic Interface

Variable

Description

Example

AcadClassic

Old R12-style accelerator keys (Ctrl+C = Cancel)

(setenv "AcadClassic" "1")

ScreenMenu

Old vertical side screen menu

CursorSize

Crosshair size (0–100)

(setenv "CursorSize" "100")

Background

Drawing area background color

(setenv "Background" "0")

Blipmode

Blips on/off

ToolTips

Show tooltips

(setenv "ToolTips" "1")

Scrollbars

Show scrollbars

(setenv "Scrollbars" "1")

ShowTabs

Show layout tabs

Paths & Files

Variable

Description

ACAD

Support file search path

ACADDRV

Driver files path

ACADHELP

Help file location

ACADLOGFILE

Log file location

ACADCFG / ACADCFGW

Configuration file location

AVEMAPS

Texture maps for rendering

ColorBookLocation

Color books path

TemplatePath

Template file path

PrinterConfigDir

Printer configuration directory

PrinterStyleSheetDir

Plot style sheets directory

Drawing & Behavior

Variable

Description

Example

MaxArray

Max items in ARRAY command

(setenv "MaxArray" "999999")

MaxHatch

Max hatch lines

AutomaticSaveMinutes

AutoSave interval

CreateViewports

Auto-create viewports on new layouts

ARXDemandLoad

How ObjectARX apps load

Attdia / Attreq

Attribute dialogs and prompts

AlarmOnError

Beep on input error

AutoSnap / Polar / Tracking

Variable

Description

AutoSnapControl

AutoSnap master control

AutoSnapColor

AutoSnap marker color

AutoSnapSize

AutoSnap marker size

AutoSnapShowAperture

Show aperture box with AutoSnap

AutoSnapPolarAng

Polar angle increment

AutoSnapPolarDistance

Polar distance

AutoSnapPolarMode

Polar tracking mode

AutoSnapPolarAddAng

Additional polar angles

AutoSnapTrackPath

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.). See csv.lsp for ~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):

  1. Check current profile: (getvar "CPROFILE")

  2. Edit the registry key at:

    HKCU\Software\Autodesk\AutoCAD\R15.0\ACAD-1:409\Profiles\<YourProfile>\Display\CmdVisLines
    
  3. Set as REG_DWORD to the desired value (e.g., 5)