Auto loading a LSP but not auto running it
I'm wanting to have a lisp routine automatically loaded for our users, but when I've placed it in the startup suite it autoruns upon opening autocad - which is causing major issues, as in AutoCAD won't complete it's startup. Is there anything I've done wrong, is it within the lisp that's caused the issue?
All help greatly appreciated.
Re: Auto loading a LSP but not auto running it
Probably within the lisp, some coders call the function at the end of a routine to make it a one step process to load and run a routine.
(defun xyz ()
(some code...)
)
(xyz)
You could put a semicolin in front of the call to run the routine as in:
(defun xyz ()
(some code...)
)
;(xyz)
You could post the code and how you're loading it here if that doesn't help.
Re: Auto loading a LSP but not auto running it
And/Or maybe adding a defun c: (command to run it)?
Code:
(defun c:xyz ()
(some code...)
)
;;(xyz)
command: xyz
Re: Auto loading a LSP but not auto running it
Ted & Tom,
Thank you both for your replies - it was missing the semi-colon priof to the command run line
(DEFUN C:PTL ()
(Some code)
)
;(C:PTL)
Re: Auto loading a LSP but not auto running it
FWIW -
I am not a fan of using the APPLOAD Startup Suite; instead I use Acad.lsp and AcadDoc.lsp respectively, where the latter loads a list of AUTOLOAD statements for all LISP routines that I want to demand load, rather than dumping each onto the memory stack at drawing open. Faster load times, with all functionality available. Lemon squeezy.