System Variables
← Prev | ↑ Chapter | Next → | Index | Symbols
System Variables
Overview
A system variable is a named, typed cell living in the host engine,
addressed by string name from AutoLISP via getvar and setvar.
System variables are a namespace distinct from AutoLISP symbols;
they are not affected by set, setq, or lexical bindings, and
they survive across LISP file loads for the lifetime of the host
session (subject to their saved in scope).
This chapter enumerates every system variable that either AutoCAD
2026 ENU or BricsCAD V25 documents in its reference, with the
fields harvested by the Phase-1.5 inventory pass (see
autolisp-spec/documentation/system-variables-inventory.sexp).
Normative Rules
The following rules apply uniformly to every entry in this chapter unless that entry explicitly overrides them.
Name case-insensitivity
System-variable names are case-insensitive on both AutoCAD and
BricsCAD. The canonical form in this specification is uppercase
(e.g. EXTNAMES, CMDECHO); (getvar "extnames") is equivalent
to (getvar "EXTNAMES") on both hosts.
Unknown names
getvar returns nil when varname does not name a defined
system variable. setvar signals an AutoLISP error in the same
case. Applications that probe for the presence of a sysvar must
therefore use getvar first, not setvar.
Integer value range
Where an entry's Type is integer or short integer, the host
clamps the supplied value to the signed-16-bit range
[~-32768~, +32767~] regardless of the wider Common-Lisp integer
type of the supplied value. ~setvar on an out-of-range value
signals an AutoLISP error.
Type coercion on setvar
setvar accepts a value whose AutoLISP type matches the entry's
declared Type. The host applies no implicit numeric coercion:
(setvar "CMDECHO" 1.0) signals an error even though CMDECHO
is an integer; the caller must supply the integer 1 explicitly.
Read-only semantics
An entry marked Read-Only: yes may be read with getvar but
attempting setvar on it signals an AutoLISP error. Read-only
status is set by the host and cannot be cleared from AutoLISP.
Angular sysvars: radians vs display units
For ANGBASE and SNAPANG specifically, setvar interprets the
supplied value as radians regardless of AUNITS. This differs
from the interactive SETVAR command, which interprets values in
the current angular display units. getvar returns radians in
both cases. (Autodesk reference: setvar (AutoLISP).)
Saved-in scope
The Scope field records the host-side persistence of the value:
drawing values persist with the current drawing file, registry
values persist across drawings under the user account, user
preference values persist per-user profile, and session values
are recomputed every time the host starts.
Defaults marked as non-literal
A Default written as varies by drawing / varies by host /
varies by session / varies by registry / varies by user
preference indicates that the vendor reference does not specify
a constant initial value: the value is derived from the drawing
template, the operating-system platform, the registry / user
profile, or the live session respectively. Conformance tests must
not assume a specific value in these cases.
Vendor divergence
Where the entry's Divergence row is filled, AutoCAD and BricsCAD
ship different defaults, types, ranges, or saved-in scopes for
the same name. Portable programs must read divergent sysvars
defensively and either probe the type before assuming a value
shape or accept both vendors' conventions.
Source Notes
- [AutoCAD 2026 Commands and System Variables Reference](https://help.autodesk.com/cloudhelp/2026/ENU/AutoCAD-Core/files/GUID-4FEBA606-95E0-4DC4-A116-257ED86DCD58.htm)
- [BricsCAD V25 System Variable Reference](https://help.bricsys.com/document/_systemvariablereference--SV_system_variable_reference_intro/V25/EN_US)
autolisp-spec/documentation/system-variables-inventory.sexp(machine-readable inventory; one plist per sysvar)issues/closed/deferred-system-variables-inventory-completion.issue(Phase-1.5 build-pipeline notes)