CSV.lsp Version Comparison (v3.60 vs v7.0)¶
Comparison: Major architectural changes between versions
v3.60: 5,186 bytes (195 lines) - Registration-enforced trial version
v7.0: 10,384 bytes (281 lines) - Simplified, registration-free version
Warning
Major Rewrite in v7.0
The v7.0 CSV.lsp is fundamentally different from v3.60. Key changes:
? Removed: Registration/licensing system entirely
? Removed: Trial period enforcement (100-day hack)
? Removed: Error handler with work recovery
? Added: Inline system variable setting (40+ variables)
? Added: Mass module auto-loading (70+ modules)
? Added: Dictionary-based project detection
Size & Complexity Comparison¶
Metric |
v3.60 |
v7.0 |
Change |
|---|---|---|---|
File Size |
5,186 bytes |
10,384 bytes |
+100% (2x larger) |
Lines of Code |
195 lines |
281 lines |
+44% |
System Variables Set |
7-11 (preserved) |
40+ (hardcoded) |
+364% |
vl-acad-defun Exports |
6 functions |
70+ functions |
+1067% |
Module List |
None |
70 modules (csvlst) |
New |
Registration Code |
~50 lines |
0 lines (removed) |
-100% |
Feature Comparison Matrix¶
Feature |
v3.60 |
v7.0 |
Notes |
|---|---|---|---|
Error Handler |
? Complex (error with recovery) |
? Removed |
v7.0 has no error handling |
System Variable Preservation |
? Selective (7-11 vars) |
? Hardcoded (40+ vars) |
v7.0 sets but doesn’t preserve original values |
Registration/Licensing |
? CheckPanelCredit() from ARX |
? Completely removed |
No registration checks at all |
Trial Period |
? 100-day hack (cv.bat date) |
? Removed |
No trial enforcement |
Batch File Date Stamp |
? Trial tracking |
? Simple batch files |
No date stamps |
Module Auto-Loading |
? Manual (VLX loads) |
? Automatic (foreach csvlst) |
v7.0 loads all modules on demand |
Function Exports |
6 functions |
70+ functions |
Massive increase in ARX interop |
Embedded Functions |
None |
pj_name(), project() |
v7.0 embeds previously external functions |
Project Detection |
File-based |
Dictionary-based |
v7.0 checks namedobjdict |
Work Recovery |
? panelvar/sitevar check |
? Dictionary check |
Different approach |
Detailed Differences¶
1. System Variable Management¶
v3.60 Approach (Preservation):
; Store original values, restore on exit
(set 'sysvarlist '("filedia" "grips" "hpbound" "osmode" "pickbox" "xrefctl" "highlight"))
(foreach a sysvarlist
(set 'sysvarlist (subst (cons a (getvar a)) a sysvarlist))
)
; ... later, restore via *error* handler
v7.0 Approach (Hardcoded):
; Just set them all to desired values (no preservation)
(setvar "lispinit" 0)
(setvar "cmdecho" 0)
(setvar "angbase" 1.5708)
(setvar "angdir" 1)
(setvar "auprec" 4)
(setvar "blipmode" 0)
; ... 40+ more system variables ...
(setvar "dimzin" 3)
(setvar "dimunit" 6)
(setvar "dimaltu" 6)
Impact:
v3.60: Restores user preferences on exit (better UX)
v7.0: Forces ConstructiVision settings (user preferences lost)
v7.0 sets 40+ system variables vs v3.60’s 7-11
2. Registration/Licensing¶
v3.60 (Complex Trial System):
; Load ARX and import license checking functions
(arxload "pcms")
(vlisp-import-exsubrs (list (findfile "pcms.arx")
"CheckPanelCredit"
"DecrementPanelCredit"))
; Check registration
(set 'returncode (CheckPanelCredit))
; Trial period enforcement (100 days from cv.bat date stamp)
(if (and (> returncode 10000)
(/= returncode 10021)
(> (fix (getvar "cdate"))
(+ 100 (atoi (substr (read-line f) 5)))))
(progn
(alert "This installation must be registered to continue...")
(startapp (findfile "wincss.exe")) ; Launch registration manager
(set 'ok nil)
)
)
v7.0 (No Registration):
; Completely removed!
; No ARX loading, no license checks, no trial period
; No wincss.exe launcher
Impact:
v3.60: Commercial product with enforced licensing
v7.0: Likely internal/patch version without license enforcement
v7.0 removes ~50 lines of registration code
3. Module Loading¶
v3.60 (VLX-Based):
; Modules loaded via VLX compilation
; No explicit module list in CSV.lsp
; VLX LOAD directive handles: (:fas "module1") (:fas "module2") ...
v7.0 (Auto-Loading):
; Define complete module list
(set 'csvlst '("bp_dlg" "bpauto" "brace" "btch" "btch_dlg" "calc_dlg"
"centgrav" "ch_dlg" "chamfer" "chrchk" "convert" "dbchk"
"dirchk" "dl_dlg" "donerev" "dowels" "dr_dlg" "drawdim"
; ... 70+ total modules ...
"weldconn" "wall_dlg" "slab_dlg" "footing" "column" "weld"))
; Auto-load all modules if not already loaded
(if (not panatt)
(foreach a csvlst (load a)))
Impact:
v3.60: Compiled VLX, protected code
v7.0: Plain LSP files, manual loading, unprotected
v7.0 explicitly lists all 70+ modules
4. Function Export (VLISP-ARX Bridge)¶
v3.60 (Minimal - 6 Functions):
(vl-acad-defun 'setvars)
(vl-acad-defun 'panel)
(vl-acad-defun 'finpan)
(vl-acad-defun 'pj_name)
(vl-acad-defun 'sdwg_dlg)
(vl-acad-defun 'site_dlg)
v7.0 (Massive - 70+ Functions):
(vl-acad-defun 'wall_dlg)
(vl-acad-defun 'slab_dlg)
(vl-acad-defun 'footing)
(vl-acad-defun 'column)
(vl-acad-defun 'weld)
(vl-acad-defun 'bp_dlg)
; ... 70+ total function exports ...
(vl-acad-defun 'weldconn)
Impact:
v3.60: Minimal ARX-LISP interop (only 6 functions exposed)
v7.0: Extensive ARX-LISP interop (70+ functions callable from ARX)
v7.0 allows ARX modules to call virtually any LISP function
5. Embedded Functions¶
v3.60:
pj_name()- External file (PJ_NAME.lsp)project()- External file (PROJECT.lsp)setvars()- External file (SETVARS.lsp)
v7.0 (Embedded):
; pj_name() now defined inline (40 lines)
(defun pj_name ()
(set 'n (1- (strlen curdir)))
(while (/= (substr curdir n 1) "\\") (set 'n (1- n)))
(set 'pjname (substr curdir (1+ n) (- (strlen curdir) n 1)))
; ... complex character filtering ...
(if (< (strlen pnlname) 3)
(set 'pnlname (substr pjname 1 5)))
(if (> (strlen pnlname) 5)
(set 'pnlname (substr pjname 1 5)))
)
; project() now defined inline (30 lines)
(defun project ()
(set 'dcl_id27 (load_dialog "project.dcl"))
; ... project selection dialog ...
)
Impact:
v3.60: Modular (functions in separate files)
v7.0: Monolithic (functions embedded in main file)
v7.0 increases file size but reduces dependencies
6. Batch File Creation¶
v3.60 (Trial Period Tracking):
rem 20250120 # Date stamp for trial period
@echo off
%1
shift
cd\
:crd
if %1 == "end" goto end
if not exist %1\nul md %1
cd %1
shift
goto crd
:end
v7.0 (Simplified):
@echo off # No date stamp
cd\
:crd
if %1 == "end" goto end
if not exist %1\nul md %1
cd %1
shift
goto crd
:end
Impact:
v3.60: First line has
rem YYYYMMDDfor trial trackingv7.0: No date stamp (no trial period to track)
Same functionality otherwise
7. Project Detection¶
v3.60 (File-Based):
(set 'curdir (getvar "dwgprefix"))
(set 'dwg (getvar "dwgname"))
(if (= (getvar "dwgname") "Drawing.dwg")
(project)) ; New/unsaved drawing
v7.0 (Dictionary-Based):
(set 'curdir (getvar "dwgprefix"))
(if (= (getvar "dwgname") "Drawing.dwg")
(set 'olddwg nil)
(set 'olddwg (getvar "dwgname")))
; Check for existing project data in drawing
(cond
((dictsearch (namedobjdict) "panel_list")
(pj_name) (md_dlg)) ; Panel project found
((dictsearch (namedobjdict) "site_list")
(pj_name) (site_dlg)) ; Site project found
(t (pj_name) (md_dlg)) ; No project, show main dialog
)
Impact:
v3.60: Checks filename only
v7.0: Checks AutoCAD named object dictionary for project metadata
v7.0 can detect project type (panel vs site) from drawing data
Architecture Philosophy Shift¶
v3.60 Philosophy¶
Commercial Product: Registration enforced, trial period, license manager
Compiled/Protected: VLX-based, FAS bytecode, source hidden
Modular: External function files, minimal inline code
User-Friendly: Preserves user preferences, restores on exit
Error Handling: Comprehensive error recovery, work saving
v7.0 Philosophy¶
Internal/Patch Version: No registration, free to use
Open Source: Plain LSP files, all code visible
Monolithic: Embedded functions, self-contained
Developer-Focused: Hardcoded settings, no preservation
Simplified: No error handling, no registration complexity
Why These Changes?¶
Hypothesis 1: Internal Development Version¶
v7.0 removes registration to simplify testing
Developers don’t want license prompts during development
Batch file simplification removes trial period annoyance
Hypothesis 2: Post-Commercial Patch¶
Company may have discontinued registration enforcement
v7.0 released as “free/legacy” version
Removed wincss.exe dependency for easier distribution
Hypothesis 3: Customer-Specific Build¶
Custom version for specific client without licensing
Embedded functions reduce dependency on external files
Dictionary-based detection for client-specific workflow
Migration Impact (v3.60 ? v7.0)¶
Breaking Changes¶
No License Enforcement - Anyone can use v7.0 indefinitely
System Variables Not Restored - User preferences overwritten
No Error Recovery - Crashes lose work (no error handler)
Different Project Detection - Uses named object dictionary
ARX Interface Expanded - 70+ functions now callable from ARX
Benefits¶
Simpler Deployment - No wincss.exe, no registration
Faster Loading - Auto-loads only needed modules
Better Debugging - All code visible (not compiled VLX)
Extended ARX API - More LISP functions accessible from ARX
Embedded Logic - Less fragile (fewer external dependencies)
Risks¶
Data Loss - No error handler means crashes lose unsaved work
User Experience - AutoCAD settings permanently changed
Security - All source code visible (no protection)
Support - Different codebase complicates bug fixes
Modernization Implications¶
For P3 (AutoCAD 2026)¶
v7.0 is better starting point - No registration/ARX dependencies
Plain LSP easier to migrate than compiled VLX
Remove hardcoded system variables (restore v3.60 preservation)
Add modern error handling (better than v3.60’s error)
For P4 (Cloud)¶
v7.0 module list helpful - Documents all 70+ modules to migrate
Dictionary-based detection is cloud-compatible
Batch files still problematic (must replace with cloud APIs)
Registration must move to cloud auth anyway
Recommendation¶
Use v7.0 as codebase (simpler, no licensing complexity)
Restore v3.60 features:
Error handler with work recovery
System variable preservation
Modern cloud-based licensing (replace ARX checks)
Files to Update in Documentation¶
csv-lsp-analysis.md (current file) - Add v7.0 section
Create:
csv-lsp-v3-vs-v7-comparison.md(this file)Update:
csv-vlx-binary-notes.md- Note v7.0 is 26% smallerUpdate: Phase plan P3 - Specify v7.0 as migration source
Document Metadata¶
Created: 2025
Purpose: Document major architectural differences between v3.60 and v7.0
Key Finding: v7.0 is a complete rewrite - registration removed, module loading changed, functions embedded
Recommendation: Use v7.0 as modernization base, restore best practices from v3.60
End of Document