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
Dave
#2
Hi,
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:
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.
Regards,
JCAMPOS
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")
Regards,
JCAMPOS
autoloading LISP routines
#4Although 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.)
ICAD.LSP:
(setq 1strun "yes")
(command "delay" 1000) ; note delay for startup scripts
ICADDOC.LSP:
(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.
(princ)
This is just a sample; the files NILERASE and TITLEBLOCK_DETECT are my own creations.
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.)
ICAD.LSP:
(setq 1strun "yes")
(command "delay" 1000) ; note delay for startup scripts
ICADDOC.LSP:
(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.
(princ)
This is just a sample; the files NILERASE and TITLEBLOCK_DETECT are my own creations.
Re: load lisp automaticaly
#5On CMS intelliCAD 9.x you can use icaddoc.lsp for that purpose instead of icad.lsp.
icaddoc.lsp is loaded with every new drawing created or opened.
Another possible option is to set LISPINIT system variable to 2. In this case all drawings will share the same LISP environment (variables, functions etc).
icaddoc.lsp is loaded with every new drawing created or opened.
Another possible option is to set LISPINIT system variable to 2. In this case all drawings will share the same LISP environment (variables, functions etc).