Zorg Posted May 26, 2009 Posted May 26, 2009 I've made some LISPs aswell as downloaded some, i've also got some VLX files from ResourceCAD. I was just wondering how/where do i put these so that they 'APPLOAD' themselves everytime i open AutoCAD Many thanks in advance, Z Quote
Lee Mac Posted May 26, 2009 Posted May 26, 2009 You can either use the Start-up Suite or the ACADDOC.lsp See here: http://www.cadtutor.net/forum/showthread.php?t=27742 post #10 onwards. Or http://www.cadtutor.net/faq/questions/53/How+do+I+automatically+load+variables%3F Quote
Freerefill Posted May 26, 2009 Posted May 26, 2009 Not sure if this is what you're looking for, but in the "Support" folder of AutoCAD, there are two lisps, named similarly to: acad.lsp (I'm using Map 2008, so mine is acad2008.lsp) acaddoc.lsp (again, mine is acad2008doc.lsp) acad.lsp is loaded once when you load AutoCAD, acaddoc.lsp is loaded every time you open a new file. These are regular LISPs and can be treated as such, including loading and running LISPs and other commands, like so: ... (load "C:\\Documents and Settings\\mmercier.UCINC\\Desktop\\LISP\\startup.lsp") (startupsuite) ... Hope that helps. ^.^ Quote
Zorg Posted May 26, 2009 Author Posted May 26, 2009 acad.lsp is loaded once when you load AutoCAD, acaddoc.lsp is loaded every time you open a new file. These are regular LISPs and can be treated as such, including loading and running LISPs and other commands, like so: ... (load "C:\\Documents and Settings\\mmercier.UCINC\\Desktop\\LISP\\startup.lsp") (startupsuite) ... Hope that helps. ^.^ Will this work for other file types like the .VLX files from ResourceCAD? Quote
Freerefill Posted May 26, 2009 Posted May 26, 2009 acad.lsp is loaded once when you load AutoCAD, acaddoc.lsp is loaded every time you open a new file. These are regular LISPs and can be treated as such, including loading and running LISPs and other commands, like so: ... (load "C:\\Documents and Settings\\mmercier.UCINC\\Desktop\\LISP\\startup.lsp") (startupsuite) ... Hope that helps. ^.^ Will this work for other file types like the .VLX files from ResourceCAD? I'm not positive, I've never really used those. However, a .vlx is sort of like a compiled LISP, so I see no reason why you shouldn't be able to load it like you would any other .lsp. Quote
Lee Mac Posted May 26, 2009 Posted May 26, 2009 acad.lsp is loaded once when you load AutoCAD, acaddoc.lsp is loaded every time you open a new file. These are regular LISPs and can be treated as such, including loading and running LISPs and other commands, like so: ... (load "C:\\Documents and Settings\\mmercier.UCINC\\Desktop\\LISP\\startup.lsp") (startupsuite) ... Hope that helps. ^.^ Will this work for other file types like the .VLX files from ResourceCAD? Just put your LISPs in your ACAD search path, then, add expressions like this to the ACADDOC.lsp (load "mylisp") Where "mylisp" is the name of the file. the "load" function will check for files with extensions in the following order: .vlx, .fas, .lsp. and so, your file (if found) will be loaded. You could also add a message to warn if the file is not loaded: (load "mylisp" "load failed") Hope this helps Lee Quote
JohnM Posted May 26, 2009 Posted May 26, 2009 I have found using the autoload function is better. Make an autoload lisp file and put that in the startup suite This way the lisp, vlx file are only loaded when you type their command and will save a lot of AutoCAD memory. It also easy to add to Don’t use a defun just a series of autoload functions so the file is automatically started (autoload "BONUSAPP" '("APP1" "APP2" "APP3")) (autoload “c:/MY Documents/MY Lisp ‘(“ML”)) Quote
Freerefill Posted May 27, 2009 Posted May 27, 2009 I have found using the autoload function is better. Make an autoload lisp file and put that in the startup suite This way the lisp, vlx file are only loaded when you type their command and will save a lot of AutoCAD memory. It also easy to add to Don’t use a defun just a series of autoload functions so the file is automatically started (autoload "BONUSAPP" '("APP1" "APP2" "APP3")) (autoload “c:/MY Documents/MY Lisp ‘(“ML”)) For added protection against Jokers, you can do one better and load/run your "startup suite" LISP within your acaddoc.lsp. 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.