Jump to content

automatic reloading lisps


warren architecture

Recommended Posts

I use about half a dozen lisp routines on AA '09 but I have to keep reloading them every time I use CAD which is getting on my nerves

 

any idea on how to get them to automaticaly load when I start the software?

Link to comment
Share on other sites

  • Replies 38
  • Created
  • Last Reply

Top Posters In This Topic

  • alanjt

    7

  • Lee Mac

    7

  • The Buzzard

    7

  • Olhado_

    5

Top Posters In This Topic

Posted Images

Just do a search for "acad.lsp" or "acaddoc.lsp" (auto-loader) files - this will be your solution. Or use Start-up Suite on Load application window.

Link to comment
Share on other sites

Use "acaddoc.lsp', which is loaded each time a drawing is created/opened.

 

Put your load statements in this file like this:

 

(load "mylisp")
(load "myotherlisp")
;;if the lisp file is not in your support file search path
(load "\\\\server\\share\\path\\lisp2")

 

Forget about the startup suite.

Link to comment
Share on other sites

thanks for the reply's guys....I'll give it ago and I'll let you know how I get on :D

Link to comment
Share on other sites

I use about half a dozen lisp routines on AA '09 but I have to keep reloading them every time I use CAD which is getting on my nerves

 

any idea on how to get them to automaticaly load when I start the software?

 

With the APPLOAD command you can also place the lisps in your Start-Up suite. Also under the Options dialog, Files tab you should make sure the path of your lisp reside under the Surrort File Search Path. See the attched images below. They are from ACAD 2009, But ACAD 2010 should be similar.

Document1.JPG

Document2.JPG

Document3.JPG

Document4.JPG

Link to comment
Share on other sites

Programs loaded by the startup suite are loaded into every drawing therefore using up memory. I use an autoload file so the programs are not loaded until you type the command name.

Just make a lisp file with no defun and use the autoload function for each program

Then put it in your startup suite and you good to go.

It’s also easy to add new programs to.

Here’s what part of my autoload file looks like

(I complie to VLX files but it works with LSP files also)

(autoload "c:/program files/quick draw/qev.vlx" '("qev"));_elevation

(autoload "c:/program files/quick draw/spl.vlx" '("spl"));_splash

(autoload "c:/program files/quick draw/qrp.vlx" '("qrp"));_raised panels

(autoload "c:/program files/quick draw/qdb.vlx" '("qdb"));_drawer bank

(autoload "c:/program files/quick draw/swa.vlx" '("swa"));_swing line adjust

(autoload "c:/program files/quick draw/qcp.vlx" '("qcp"));_center pulls

(autoload "c:/program files/quick draw/qxs.vlx" '("qxs"));_plan section

(autoload "c:/program files/quick draw/qdx.vlx" '("qdx"));_drawer box

(autoload "c:/program files/quick draw/qsc.vlx" '("qsc"));_section

(autoload "c:/program files/quick draw/qsb.vlx" '("qsb"));_line bore

So when I type QEV for my elevation program the program is loaded and started

If the program is already loaded it will not be loaded again

Also if the programs path is in your support files search paths you can omit the path

Link to comment
Share on other sites

The start-up suite is ok, but the ACADDOC.lsp is a lot more reliable. :thumbsup:

 

 

Lee,

 

Not sure what you mean by ACADDOC.lsp being more reliable. I would like to know. I have been using the Start-Up suite for many years without a hitch. Just curious as to what I need to be aware of. Could you please explain?

 

Buzzard

Link to comment
Share on other sites

I haven't had a problem *touch wood*, but I have seen numerous cases where people have, and have also been warned against using it.

 

A few examples:

 

http://www.theswamp.org/index.php?topic=3958.0

 

http://www.theswamp.org/index.php?topic=13870.0

 

Another reason:

http://www.cadtutor.net/forum/showthread.php?t=26121

 

 

Lee

Link to comment
Share on other sites

I haven't had a problem *touch wood*, but I have seen numerous cases where people have, and have also been warned against using it.

 

A few examples:

 

http://www.theswamp.org/index.php?topic=3958.0

 

http://www.theswamp.org/index.php?topic=13870.0

 

Another reason:

http://www.cadtutor.net/forum/showthread.php?t=26121

 

 

Lee

 

I do not dispute any of the problems mentioned. I guess there is so much to know. But I thought I would mention the Start-Up anyway since it is there and less of a hassle implement. I will keep those issues you have shown in mind anyway.

 

Thanks for the info.

The Buzzard

Link to comment
Share on other sites

The start-up suite is ok, but the ACADDOC.lsp is a lot more reliable. :thumbsup:

 

Alright, so I am sure I do not have as much experience as Lee (in fact I know I do not); but I use the start-up suite almost all the time and have never had a problem. I have even ran these LISP files 20 to 30 times in a row.

 

Anyways, my point is perhaps initially the start-up suite was unreliable; but with 2009 and 2010 versions I have yet to run into a problem.

 

*knock on wood* :)

Link to comment
Share on other sites

Alright, so I am sure I do not have as much experience as Lee (in fact I know I do not); but I use the start-up suite almost all the time and have never had a problem. I have even ran these LISP files 20 to 30 times in a row.

 

Anyways, my point is perhaps initially the start-up suite was unreliable; but with 2009 and 2010 versions I have yet to run into a problem.

 

*knock on wood* :)

 

True, I believe the unreliability was only in the earlier versions of ACAD, but there are also a lot of other benefits in using the ACADDOC.lsp over the Start-up Suite as posted in the CADPanacea Feed. :)

 

Lee

Link to comment
Share on other sites

Programs loaded by the startup suite are loaded into every drawing therefore using up memory. I use an autoload file so the programs are not loaded until you type the command name.

Just make a lisp file with no defun and use the autoload function for each program

Then put it in your startup suite and you good to go.

It’s also easy to add new programs to.

Here’s what part of my autoload file looks like

(I complie to VLX files but it works with LSP files also)

 

(autoload "c:/program files/quick draw/qev.vlx" '("qev"));_elevation

(autoload "c:/program files/quick draw/spl.vlx" '("spl"));_splash

(autoload "c:/program files/quick draw/qrp.vlx" '("qrp"));_raised panels

(autoload "c:/program files/quick draw/qdb.vlx" '("qdb"));_drawer bank

(autoload "c:/program files/quick draw/swa.vlx" '("swa"));_swing line adjust

(autoload "c:/program files/quick draw/qcp.vlx" '("qcp"));_center pulls

(autoload "c:/program files/quick draw/qxs.vlx" '("qxs"));_plan section

(autoload "c:/program files/quick draw/qdx.vlx" '("qdx"));_drawer box

(autoload "c:/program files/quick draw/qsc.vlx" '("qsc"));_section

(autoload "c:/program files/quick draw/qsb.vlx" '("qsb"));_line bore

 

 

So when I type QEV for my elevation program the program is loaded and started

If the program is already loaded it will not be loaded again

Also if the programs path is in your support files search paths you can omit the path

 

Thats true if you load all your programs that way. If you create one lisp containing the program loads of programs you want loaded, A button in a menu can trigger the other programs to load when you need them. So all you are really doing is only loading the one program in your Start-Up suite that is responcible to load all the other programs.

 

Example:

;;;/////////////////////////////////////////////////////////////////
;;; LL.lsp Load Lisp
;;;/////////////////////////////////////////////////////////////////
;;; Function - LL.lsp Start-Up              ;Describe function
(defun C:LL ()                              ;Define function
 (LLLOAD)                                  ;GOTO LLLOAD function
)                                           ;End of define function
;;;/////////////////////////////////////////////////////////////////
;;; Function - LL.lsp Load All Programs     ;Describe function
(defun LLLOAD ()                            ;Define function
 (load "LL1.lsp")                          ;Load LL1.lsp
 (princ "\nLL1.lsp Loaded...")              ;Inform user program is loaded
 (load "LL2.lsp")                          ;Load LL2.lsp
 (princ "\nLL2.lsp Loaded...")              ;Inform user program is loaded
 (load "LL3.lsp")                          ;Load LL3.lsp
 (princ "\nLL3.lsp Loaded...")              ;Inform user program is loaded
 (load "LL4.lsp")                          ;Load LL4.lsp
 (princ "\nLL4.lsp Loaded...")              ;Inform user program is loaded
 (load "LL5.lsp")                          ;Load LL5.lsp
 (princ "\nLL5.lsp Loaded...")              ;Inform user program is loaded
 (load "LL6.lsp")                          ;Load LL6.lsp
 (princ "\nLL6.lsp Loaded...")              ;Inform user program is loaded
 (load "LL7.lsp")                          ;Load LL7.lsp
 (princ "\nLL7.lsp Loaded...")              ;Inform user program is loaded
 (LLLOADMESSAGE)                           ;GOTO LLLOADMESSAGE function
)                                           ;End of define function
;;;/////////////////////////////////////////////////////////////////
;;; Function - LL.lsp Load Message          ;Describe function
(defun LLLOADMESSAGE ()                     ;Define function
 (prompt "\nAll LL.lsp Programs Loaded...");Inform user all programs are loaded
)                                           ;End of define function
;;;/////////////////////////////////////////////////////////////////

 

 

//
//      AutoCAD menu file - C:\LOAD LISP\LL.mnc
//
***MENUGROUP=LL
***POP1
**LL
ID_001         [LL]
ID_002         [--]
ID_003         [Click Here To Load All Programs...](load "LL")^C^CLL
ID_004         [--]
ID_005         [Load Lisp 1...]^C^CLL1
ID_006         [Load Lisp 2...]^C^CLL2
ID_007         [Load Lisp 3...]^C^CLL3
ID_008         [--]
ID_009         [->More Programs]
ID_010           [Load Lisp 4...]^C^CLL4
ID_011           [Load Lisp 5...]^C^CLL5
ID_012         [<-Load Lisp 6...]^C^CLL6
ID_013         [--]
ID_014         [Load Lisp 7...]^C^CLL7
//
//      End of AutoCAD menu file - C:\LOAD LISP\LL.mnc
//

Link to comment
Share on other sites

the autoload file does not load the program until you type the program hot key.

my autoload lisp file is loaded into each drawing via the startup suite

but no programs are loaded into the drawing.

Link to comment
Share on other sites

the autoload file does not load the program until you type the program hot key.

my autoload lisp file is loaded into each drawing via the startup suite

but no programs are loaded into the drawing.

 

The Start-Up suite method I show does not load any programs until you hit the button. Just the program that contains the files to load is

the only program loaded into each drawing and it file size is very small. No programs are loaded till you want them. Not that much different from your method.

Link to comment
Share on other sites

Yet another method *shakes fist at Commandobill* is to stick a LISP into the proper section on the Command User Interface (the LISP Files section, to be precise).

 

I wouldn't recommend this method since it is, in my opinion, harder to work with than acaddoc.lsp or appload, but AutoCAD is, after all, the swiss army knife of utilities, so I figured I'd mention it. :P

Link to comment
Share on other sites

Yet another method *shakes fist at Commandobill* is to stick a LISP into the proper section on the Command User Interface (the LISP Files section, to be precise).

 

I wouldn't recommend this method since it is, in my opinion, harder to work with than acaddoc.lsp or appload, but AutoCAD is, after all, the swiss army knife of utilities, so I figured I'd mention it. :P

 

I have seen code place in the drawing editor as text and it will run.

 

Just choose your poison.

Link to comment
Share on other sites

Lee,

 

Not sure what you mean by ACADDOC.lsp being more reliable.

 

Unreliable is only a small reason to avoid the startup suite. The #1 reason is because there is no easy way to migrate that list from one version to the next, or even from one machine to the next. On the other hand, "acaddoc.lsp" is always loaded each time a drawing is loaded. Migrating this list is as simple as pointing to a central location for this file, or copying the file to the new machine (or other machine)

Link to comment
Share on other sites

The Start-Up suite method I show does not load any programs until you hit the button. Just the program that contains the files to load is

the only program loaded into each drawing and it file size is very small. No programs are loaded till you want them. Not that much different from your method.

 

The startup suite, if working as designed, certainly *does* load all the applications in it at startup.

Link to comment
Share on other sites

the startup suite is part of the profile so when changing machines import the profile and the programs list will be there, but you will have to bring over the programs also and depending on where they are located you might have to make a few path adjustments. this is why you should always make a folder on the C drive for programs because that path never changes

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...