AfraLisp Blog

The AutoLisp/Visual Lisp/VBA Resource Website

AfraLisp Blog

Home Newsletter Utter Rubbish Coding Tips AutoCAD Tips Contact Downloads WAUN

Do you know how to load a routine and to automatically have it run when Acad2000 starts (without any user input) ??

Kevin
--------------------------

OK here's one method. Copy and paste this coding into Notepad and save it as "Testing.lsp". This will be our routine that we want to run.

;CODING STARTS HERE
(defun testing ()

(alert "Testing, Testing 123")

(princ)

)
(princ)
;CODING ENDS HERE

-----------------------------------

Now add the following to your Acad.lsp file or Acaddoc.lsp file :

;CODING STARTS HERE
(load "Testing" "\nTesting.Lsp not found.")

;-----------------------------------------------

(defun-q TESTINGSTARTUP ()

(testing)

);defun-q

(setq S::STARTUP (append S::STARTUP TESTINGSTARTUP))
;CODING ENDS HERE

The AutoLisp/Visual Lisp/VBA Resource Website

Copyright © 1999-Perpetuity by AfraLisp

All rights reserved.
Information in this document is subject to change without notice.
Site created and maintained by Kenny Ramage

The AutoLisp/Visual Lisp/VBA Resource Website