π¦ Lesson 5.15 β Packaging and Sharing AutoLISP Routines
Learn how to compile your LISP routines into distributable files and manage them effectively across a team.
π What Youβll Learn
By the end of this lesson, youβll be able to:
- Compile your AutoLISP code into secure, distributable
.FAS
files - Understand the pros and cons of
.LSP
,.FAS
, and.VLX
formats - Share and manage your code with coworkers using best practices
- Set up a centralized folder system for team access
π§ Why It Matters
When you’re distributing AutoLISP tools to coworkers or clients, you want to protect your code, ensure consistency, and avoid accidental edits. Compiled files and proper version control help maintain a stable and professional environment.
π οΈ Tools Youβll Use
Tool / File | Purpose |
---|---|
AutoCAD VLIDE | The Visual LISP Editor used to write and compile code |
.FAS file | A compiled and secure version of .LSP code |
APPLOAD | Command to load AutoLISP files manually |
acad.lsp , startup.lsp | Load shared tools automatically |
Shared folders | Host tools for version control and teamwork |
π§ Lesson Structure
1οΈβ£ Why Compile Code?
Format | Editable? | Secured? | When to Use |
---|---|---|---|
.lsp | Yes | No | During development and testing |
.fas | No | Yes | When distributing to users |
.vlx | No | Yes | When bundling multiple routines |
β
Use .fas
to hide source code and improve load performance.
2οΈβ£ How to Compile a .LSP into .FAS
- Open your
.lsp
file in AutoCADβs Visual LISP Editor (VLIDE) - Go to:
Tools
βMake Application...
- Choose
.FAS
or.VLX
- Save the compiled file in your shared tools directory
- Load it using
APPLOAD
or a startup script
(load "tools/my_tool.fas")
π§ Compiled files must be recompiled if you edit the original .lsp
.
3οΈβ£ Setting Up a Shared Folder for Teams
Structure your shared LISP directory like this:
/CAD-TOOLS/
βββ compiled/
β βββ titleblock.fas
β βββ layer_creator.fas
βββ source/
β βββ titleblock.lsp
β βββ layer_creator.lsp
βββ loaders/
β βββ startup.lsp
- Grant read-only access to compiled folder
- Keep
.lsp
files in source for version control (e.g., Git) - Centralize
startup.lsp
to load routines consistently
4οΈβ£ Maintain Version Control
Include version headers in your .lsp
files:
;;; titleblock.lsp
;;; Version: 1.2.3
;;; Date: 2025-05-29
;;; Description: Auto-inserts and fills title block attributes.
Use a changelog or Git commit messages to track changes across the team.
β Lesson Checklist
Task | Completed |
---|---|
Compiled at least one .lsp file into a .fas | β |
Set up a shared folder with proper file permissions | β |
Created or updated a central startup.lsp loader | β |
Added version headers and documentation to code | β |
π Quick Tips
Tip | Why It Helps |
---|---|
Keep a changelog in each file | Helps teams track and audit code changes |
Use .fas for non-editable production code | Protects logic from tampering |
Backup source and compiled folders separately | Prevents accidental overwrites |
Load from a network path when collaborating | Ensures everyone is using the same version |
π§© Real-World Applications
Scenario | What You Share | Why It Works |
---|---|---|
CAD team at a firm | Compiled tools via startup script | Guarantees consistent tool access |
Training environment | .FAS routines without source code | Prevents learners from editing core logic |
Client distribution | Branded .FAS package with installer | Protects IP and creates a professional feel |
π Files and Resources
File / Resource | Description |
---|---|
titleblock.lsp | Source file for title block routine |
titleblock.fas | Compiled version for production |
startup_loader.lsp | Loads compiled tools from shared directory |
lisp_distribution_guide.docx | Printable checklist and tips for sharing code |
π Review Table
Term | Description | Example |
---|---|---|
.fas | Compiled LISP file | titleblock.fas |
VLIDE | Visual LISP Editor | Use to compile .lsp files |
APPLOAD | Command to load external applications | Load .fas via dialog or command line |
startup.lsp | Script to run at AutoCAD startup | (load "compiled/layer_creator.fas") |