Function Entry: GETENV

← Prev | ↑ Chapter | Next → | Index | Symbols

Function Entry: GETENV

Name

getenv

Class

Function

Syntax

(getenv variable-name)

Arguments and Values

  • variable-name: string; the environment-variable name. Names must be spelled and cased exactly as stored in the system registry.

Description

Returns the value bound to the named environment variable. Returns nil if the variable is not defined.

Return Values

A string, or nil.

Side Effects

None.

Examples

  • After ACAD is set to /acad/support: (getenv "ACAD") returns "/acad/support".
  • For an undefined variable: (getenv "NOSUCH") returns nil.
  • (getenv "MaxArray") returns "10000" if the variable is set to that value.

Availability

  • AutoCAD 2026: documented.
  • BricsCAD V26: presumed compatible.
  • Status: AutoCAD documented; BricsCAD presumed-both pending Phase 4 verification.