load lisp automaticaly

New to IntelliCAD? Get started here with basic questions and answers.

Moderators: CMS Inc, avaernes

Post Reply
Posts: 2
Joined: Tue Dec 07, 2010 8:46 pm

load lisp automaticaly

Post by phenom » Wed Dec 08, 2010 4:33 pm

ive been reading the help on icad6.6pro and cant seem to get a areap.lisp to load automatically when i start the program, can some one help with this.
thank you

Post by JCAMPOS » Thu Dec 09, 2010 3:45 am


In order to load LISP files at program's initialization, you need to create an icad.lsp file and put there your load functions, such as the following:

Code: Select all

(load "C:\\CompletePath\\LispFile.lsp")
Put the icad.lsp file in the program's execution folder and, the next time you start the program, your routines will be loaded automatically.

Posts: 2
Joined: Tue Dec 07, 2010 8:46 pm

Post by phenom » Thu Dec 09, 2010 9:04 pm

Great thank you

took a little playing around

(load "C:\\Program Files\\CMS\\IntelliCAD 6.6 Professional\\areap.lsp")
i needed double backslashes.
thanks again
Valued Contributor
Posts: 31
Joined: Tue Sep 18, 2012 11:44 am

autoloading LISP routines

Post by Userlevel6 » Thu Sep 20, 2012 3:07 pm

Although this is an old thread, I have a little something to add...

Follow the ACAD convention. Make an ICAD.LSP, as well as an ICADDOC.LSP.

The ICAD.LSP, if it's on your search path, will load when ICAD.exe starts up, followed by ICADDOC.LSP.

If you do not close ICAD.exe and then open another drawing, you'll find that ICADDOC.LSP loads, but ICAD.LSP does not. This is by design.

Personally, I use something like this...
(delay command is to allow time for ICAD to load before processing a script called from command line using /b flag.)
(setq 1strun "yes")
(command "delay" 1000) ; note delay for startup scripts

(if (eq 1strun "yes")
(setq 1strun nil)
(progn ;load these only if this is not the startup drawing!
(load "NILERASE") ; erase empty text entites
(load "TITLEBLOCK_DETECT") ; display titleblock size-orientation
(princ "...done auto-loading LISP routines.")
) ;end if
;; Silent load.

This is just a sample; the files NILERASE and TITLEBLOCK_DETECT are my own creations.
Post Reply