SETVARS.lsp — AutoCAD System Variable Configuration

Module: setvars.lsp
Version: v3.60
Category: Core Application
Complexity: Low
Size: 3.6 KB (66 lines)

Note

Critical Environment Setup Module

This module establishes the standardized AutoCAD environment for ConstructiVision operations. It sets 40+ system variables to ensure consistent behavior regardless of user preferences, then restores them after operations complete.


Overview

Purpose

The setvars function configures AutoCAD’s system variables to create a controlled, predictable execution environment for ConstructiVision operations.

Role in CSV 3.60 Architecture

Position in Call Chain:

CSV command initiated ? CSV.lsp ? (setvars) ? Operations ? Restore

Called By:

  • CSV.lsp - Main application entry point

  • Major operation entry points


System Variables Configured

Display & Visual Settings

Variable

Value

Purpose

cmdecho

0

Suppress command echo

blipmode

0

Disable selection blips

grips

0

Disable grip display

ucsicon

0

Hide UCS icon

Angular & Unit Settings

Variable

Value

Purpose

angbase

1.5708 (90°)

North = 0° for architectural

angdir

1

Counterclockwise

lunits

4

Architectural units

luprec

4

4 decimal places

Drawing Precision Settings

Variable

Value

Purpose

osmode

0

Object snaps disabled

orthomode

0

Orthographic mode off

snapmode

0

Grid snap off


Source Code

File Location: src/x86/v3_60/v3.60/setvars.lsp

Key excerpt - saves user OSMODE:

(set 'os (getvar "osmode"))  ; Save for restoration
(setvar "osmode" 0)          ; Disable during operations

Document Metadata

Status: Comprehensive analysis
Last Updated: 2026-01-20


End of Document