Be warned this is a bit of a Rube Goldberg. but it works!
I will be demonstrating with Autocad 2014.
First you will need to make an Autocad Script file that contains some undocumented commands. I named mine build.scr
(Note that vlisp-compile-list
is not documented anywhere. If you do find some documentation please let me know!)
vlide
(
vlisp-compile-list
'st
(
list
(strcat (getenv "UserProfile") "\\Documents\\AutocadFiles\\gui.lsp"))
...
)
(strcat (getenv "UserProfile") "\\Documents\\AutocadFiles\\CompiledLisp.fas")
)
Then make a batch file that contains this:
@echo off
cd c:\Program Files\Autodesk\AutoCAD 2014
start acad.exe /b build.scr
It starts AutoCAD and runs the specified script
next you will need to Download and install AutoHotKey
and build a script like this for it:
Run, BuildLisp.bat
sleep, 30000
WinActivate, Autodesk AutoCAD 2014 - [Drawing1.dwg]
WinActivate, Visual LISP for AutoCAD <Drawing1.dwg>
WinActivate, Autodesk AutoCAD 2014 - [Drawing1.dwg]
sleep, 10000
WinClose, Autodesk AutoCAD 2014 - [Drawing1.dwg]
When you activate this script. It should open AutoCAD and build all of your LSP files into a single .FAS then close.
Somethings to Note. The Visual LISP editor must be open to compile, The compile will only happen when window activation occurs.
If anyone finds a better way. PLEASE Let me know!