PROJECT.lsp — Project Selection & Initialization¶
Module: project.lsp
Version: v3.60
Category: Project Management
Complexity: Medium
Size: 2.7 KB (56 lines)
Note
Project Workflow Controller
This module manages the initial project selection workflow, determining whether the user wants to create a new project or open an existing one. It coordinates with new.lsp for new projects and handles directory validation for existing projects.
Overview¶
Purpose¶
The project function displays the project selection dialog and routes the user to the appropriate workflow (new project creation or existing project opening). It validates directory selections and prevents users from placing project files in AutoCAD system directories.
Role in CSV 3.60 Architecture¶
Position in Call Chain:
CSV command ? CSV.lsp ? (project) ? THIS MODULE ? new.lsp or dwgnew.lsp
Function Documentation¶
(project)¶
Algorithm:
Display Project Dialog
Shows
project.dclwith “New” or “Old” project optionsSets help context to “pj”
Route Based on Selection:
pnl= “old”: Open existing project (validate directory)pnl= “new”: Call(new)for new project creationpnl= “cancel”: Set to “md” (menu display)
Existing Project Validation:
Prompt for project directory using file dialog
Extract directory path from selected file
Call
(dirchk)to validate directoryAlert if AutoCAD system directory detected
Loop until valid directory selected
Post-Selection:
Load
new.dcl“type” dialog for drawing type selection
Key Features¶
Directory Validation¶
Protection Logic:
(dirchk)
(if x
(alert (strcat curdir "\nis an AutoCAD program directory...")))
Prevents:
Placing project files in AutoCAD installation directory
Placing project files in system directories
Accidental corruption of AutoCAD files
File Dialog Integration¶
Initial Path:
(set 'curdir (strcat acaddir "Project Files\\"))
Prompt: “Double click the location of your Existing Project, then click SAVE.”
File Type Filter: .tmp (dummy extension for directory selection)
Global Variables¶
Input:
pnl- User selection (“old”, “new”, “cancel”)acaddir- AutoCAD program directorycurdir- Current project directory
Modified:
curdir- Set to selected project directorypnl- May be set to “md” on cancel
Calls:
(new)- For new project creation(dirchk)- Directory validation
Document Metadata¶
Status: Comprehensive analysis
Last Updated: 2026-01-20
End of Document