Acad Specific Functions
Initialization, Error handling

Overview

AutoCAD specific general mechanisms to load programs and define commands. See also Lisp specific error handling and debugging issues.

Version and Platform Predicates

Application Loading

Initialization, Error Handling

For error handling, safe restauration of previous system settings, we use a global list of error stack frames, to which we can push new frames or from which we can restore the previous frame. This is done by save/restore methods and special initialiaztion and restauration functions and special error functions. You may want to see the special predefined keywords for error stack frames.

Naming Conventions

STD-VER- is for versions, STD-SYS- for systems, STD-VAR- for error handling (sysvar resetting)

VL means Vital Lisp OR Visual Lisp. Any of them is sufficient.

Function Reference

Library Management Functions

(STDLIB-PROJECT-INIT) ; run-time initialization

(STDLIB-FORCE-DELAYED) ; load delayed modules

(STDLIB-VERSION) ; => real number

(STDLIB-RELEASE-P) ; T or nil

(STDLIB-BETA-P) ; nil or T

*STDLIB-CDATE*, *STDLIB-DATE* ; build date

*MODULE-PATH*, *STDLIB-PATH* ; module search path

Version Predicates

AutoLISP Version Predicates:

(STD-VL-P) ; in Visual or Vital Lisp mode?

(STD-VLA-P) ; vla- "Visual Lisp Automation" supported?

(STD-VLISP-P) ; in Visual Lisp?

(STD-VLISP-BETA1-P) ; in Visual Lisp public beta1 preview?

(STD-VILL-P) ; in Vital Lisp?

(STD-VLIDE-P) ; running in a VL IDE?

(STD-VLRTS-P) ; VL RTS loaded?

(STD-VL-AVAILABLE-P) ; VL RTS or VL IDE available?

(STD-ACOMP-P) ; in acomp compiled AutoLISP?

Acad Version Predicates:

(STD-VER-R2000-P) ; AutoCAD 2000 or later?

(STD-VER-R14-P) ; R14 or later?

(STD-VER-R13-P) ; R13 or later?

(STD-VER-R12-P) ; R12?

(STD-VER-WIN-P) ; Windows platform?

(STD-VER-INT-P) ; International Release?

(STD-VER-LANGUAGE) ; Language '(:ENGLISH :GERMAN :FRENCH :ITALIAN :SPANISH ...)

(STD-VER-NUM) ; => 2.7,10.10,13.1,13.4,13.41,14.0, 14.01,15.0,...

(STD-ACADVER) ; cached (getvar "ACADVER")

(STD-ACADPLATFORM) ; cached (getvar "PLATFORM")

System (Platform) Predicates:

(STD-SYS-DOS-P) ; DOS, not MSWIN

(STD-SYS-DOSBASED-P) ; DOS, MSWIN or OS/2 (dos-alike filesystem)

(STD-SYS-MSWIN-P) ; MS Windows

(STD-SYS-UNIX-P) ; Unix

(STD-SYS-MAC-P) ; Apple Macintosh

(STD-SYS-OS2-P) ; IBM OS2

(STD-SYS-LONGFNAME-P) ; long filenames supported?

(STD-ACAD-CONNECTION-P) ; only nil when Vill is running standalone

Application Loading

(STD-LOAD str) ; load a lisp with diff. extensions (FAS, LSP, BI4, VLX)

(STD-LOAD-EXTERNAL str) ; external module extensions too (ARX, EXP, EXE,...)

Initialization, Error handling: Module STDERROR

(*STD-ERROR* str) ; standard error handler

(STD-VAR-INIT alst) ; initialize and save systemvars

(STD-VAR-RESTORE) ; general cleanup

(STD-VAR-PUSH alst) ; push new error stack frame

(STD-VAR-POP) ; restore last error stack frame