NEW.lsp — New Project Creation Workflow¶
Module: new.lsp
Version: v3.60
Category: Project Management
Complexity: Medium
Size: 1.9 KB (38 lines)
Note
Project Directory Setup
This module handles the creation of new projects by prompting for project name and directory, validating input, creating the directory structure, and initializing project state variables.
Overview¶
Purpose¶
The new function guides users through new project creation by collecting project name/directory, validating input against AutoCAD naming rules, creating the directory structure via Windows shell command, and setting up initial project state.
Algorithm¶
Initialize & Loop Until Valid Input
Set default directory to
acaddir/Project Files/Display “new” dialog from
new.dcl
Dialog Configuration
pjnamefield: Character validation viachrchkcurdirfield: Character validation viachrchkHelp context: “nw”
Input Validation
Ensure not empty
Ensure not default “Project Files\” directory
Ensure not acaddir (AutoCAD installation)
Directory Creation
(command "shell" "cv" "path" "to" "dir" "end")
Uses Windows shell to create directory structure
Creates nested directories if needed
Initialize Project State
newpan= “new”x= “t” (success flag)ld= “pt” (panel template mode)xx= “new”
Key Features¶
Directory Path Building¶
Shell Command Format:
"cv" "path" "element1" "element2" "..." "end"
Example:
Input: C:\My Projects\Building\
Output: "cv" "C:" "My" "Projects" "Building" "end"
Validation Loop¶
Continues Until:
Valid directory entered
User cancels (
pnl= “cancel”)
Global Variables¶
Input:
acaddir- AutoCAD installation directorycurdir- Current/selected directorypnl- User action (“cancel” or continue)
Output:
curdir- New project directory (with trailing backslash)newpan- Set to “new”ld- Load mode (“pt”)xx- Status (“new”)x- Success flag
Document Metadata¶
Status: Comprehensive analysis
Last Updated: 2026-01-20
End of Document