yrnomad Posted March 6, 2009 Posted March 6, 2009 Is it better/faster to have a bunch of lisp routines in one file for loading, or load them individually through Startup Suite? I had a longtime AutoCAD user tell me to load all my lisp routines in one file, that it was better for the program to load. I figured that there wouldn't be any noticeable difference between having everything in one file and having startup suite load them for me. Any advice? Thanks Quote
Lee Mac Posted March 6, 2009 Posted March 6, 2009 I would recommend using the ACADDOC.lsp instead of the startup-suite as this is a more reliable method for loading the LISP files. Quote
yrnomad Posted March 6, 2009 Author Posted March 6, 2009 So, do a (load "lispname") if the location is in my search path? What about my question of one file vs loading individually? Quote
Lee Mac Posted March 6, 2009 Posted March 6, 2009 Yes, (load "filename" "filename not Loaded") Is correct. As for your other question, I would doubt it would make much difference unless we are talking about thousands of files to load individually. But I would say it would be quicker putting all the LISPs in one file and loading the one file. Only because, when you perform the "load..." ACAD is having to search in the search path for the correct file, and so will have to do this multiple times if you have more than one file to load. So have ACAD load only one file may be slightly quicker. Hope this helps, Lee Quote
jammie Posted March 6, 2009 Posted March 6, 2009 Is it better/faster to have a bunch of lisp routines in one file for loading, or load them individually through Startup Suite? I think a lot of it is down to personal choice Using the startup suite or ACADDOC.lsp certainly offers greater flexibility to manage routines and allows you to be selective when loading routines into a drawing. For greater efficiency also consider using AUTOLOAD instead of LOAD. This allows all your routines to be called upon in a drawing but importantly they are not loaded until the first instance of typing the command name Quote
lpseifert Posted March 6, 2009 Posted March 6, 2009 You may want to load and execute the routines that you use occasionally similar to this (if (not c:foo) (load "lispfilename"));foo; only loads them when you need them; to be put on a toolbar button, toolpalette, etc... Quote
Lee Mac Posted March 6, 2009 Posted March 6, 2009 For greater efficiency also consider using AUTOLOAD instead of LOAD. This allows all your routines to be called upon in a drawing but importantly they are not loaded until the first instance of typing the command name Thats some lateral thinking Jammie, nice one. I suppose its a trade off between a delay in drawing session loading time and command invocation loading time. Nice one Lee Quote
Recommended Posts
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.