BILL WILLIAMS Posted October 22, 2009 Share Posted October 22, 2009 Sometimes my lisps load and sometimes they don't. It is quite frustrating! I was wondering if, I added to the acad2008.lsp, a line that says (load "E:/STRIKER") and get acad2008 to load the lisp programs that are in the STRIKER folder? Or, maybe, (load "E:/STRIKER/MYLISPS") whereas my lisp programs would be in the folder MYLISPS. Your thoughts please, Bill Williams Quote Link to comment Share on other sites More sharing options...
ReMark Posted October 22, 2009 Share Posted October 22, 2009 I did something similar with my acad200X.lsp file. I added this line at the end of the file: (load "ReMark.lsp "") ReMark.lsp contains all the legacy LISP routines I have accummulated over the years that I am still fond of using. Every so often I cull this file out as I discover new ways of doing things or AutoCAD adds something I like better. BTW...Bill. Is your first name William as well? Quote Link to comment Share on other sites More sharing options...
BILL WILLIAMS Posted October 22, 2009 Author Share Posted October 22, 2009 That would be quite interesting wouldn't it, William Williams. But no it is just plain old Bill. So if I put (load "mylisps.lsp"") at the end of acad2008doc.lsp with all my lisp in the file (mylisp.lsp) I can get rid of the problem I am now facing? Quote Link to comment Share on other sites More sharing options...
ReMark Posted October 22, 2009 Share Posted October 22, 2009 Yes you can. I asked about your name because I knew a guy named William A. Williams at one time. He was the head of the Industrial Wastewater section of a consulting engineering company I had worked at. Just curious. Quote Link to comment Share on other sites More sharing options...
BILL WILLIAMS Posted October 22, 2009 Author Share Posted October 22, 2009 Not the same Williams. You say education is life long. I couldn't agree more. Where would life be without learning? I might as well roll up in a ball and die if I couldn't learn. Quote Link to comment Share on other sites More sharing options...
ReMark Posted October 22, 2009 Share Posted October 22, 2009 Couldn't agree with you more. Too bad I had to wait a few years before I learned that lesson. Quote Link to comment Share on other sites More sharing options...
BILL WILLIAMS Posted October 22, 2009 Author Share Posted October 22, 2009 But you learned. That's the main thing. Speaking of learning, I plan on putting all my lisp programs in one file folder and call it MYLISPS which is located at E:\Striker\and after that go into acad2008.lsp and add a line, (load "MYLISPS "") at the end. Am I correct? Quote Link to comment Share on other sites More sharing options...
lpseifert Posted October 22, 2009 Share Posted October 22, 2009 You may want to consider using (or creating) acaddoc.lsp instead. The acadXXXXdoc.lsp file will be overwritten if you do a repair or reinstall. From Help on acaddoc.lsp The ACADDOC.LSP File (Concept)The acaddoc.lsp file is intended to be associated with each document (or drawing) initialization. This file is useful if you want to load a library of AutoLISP routines to be available every time you start a new drawing (or open an existing drawing). Each time a drawing opens, AutoCAD searches the library path for an acaddoc.lsp file. If it finds one, it loads the file into memory. The acaddoc.lsp file is always loaded with each drawing regardless of the settings of ACADLSPASDOC. Most users will have a single acaddoc.lsp file for all document-based AutoLISP routines. AutoCAD searches for an acaddoc.lsp file in the order defined by the library path; therefore, with this feature, you can have a different acaddoc.lsp file in each drawing directory, which would load specific AutoLISP routines for certain types of drawings or jobs. The acaddoc.lsp file can contain AutoLISP code for one or more routines, or just a series of load function calls. The latter method is preferable, because modification is easier. If you save the following code as an acaddoc.lsp file, the files mydocumentapp1.lsp, build.lsp, and counter.lsp are loaded every time a new document is opened. (load "mydocumentapp1")(load "build")(load "counter") Warning Do not modify the reserved acad2009doc.lsp file. Autodesk provides the acad2009doc.lsp file, which contains AutoLISP-defined functions that are required by AutoCAD. This file is loaded into memory immediately before the acaddoc.lsp file is loaded. Quote Link to comment Share on other sites More sharing options...
rkmcswain Posted October 22, 2009 Share Posted October 22, 2009 You may want to consider using (or creating) acaddoc.lsp instead. Absolutely. There is zero reason to use the AutoCAD-owned files. Quote Link to comment Share on other sites More sharing options...
BILL WILLIAMS Posted October 22, 2009 Author Share Posted October 22, 2009 You've got me interested so how do I go about putting it all together? Quote Link to comment Share on other sites More sharing options...
lpseifert Posted October 22, 2009 Share Posted October 22, 2009 The acaddoc.lsp file is just a text file. If you don't have one (it doesn't come with Acad OOTB) then... Open Notepad and put this line in it (load "MYLISPS") assuming that "MYLISPS" is a lisp file. Then saveas acaddoc.lsp somewhere in acad's support path. Instead of Notepad you can type vlide at the command line to open the Vlisp editor and do the same. (can of worms) Quote Link to comment Share on other sites More sharing options...
BILL WILLIAMS Posted October 22, 2009 Author Share Posted October 22, 2009 Thanks much for your help. I'll do that as soon as I get caught up. Quote Link to comment Share on other sites More sharing options...
ReMark Posted October 22, 2009 Share Posted October 22, 2009 (load "ReMark.lsp "") Been doing this since release 9 and it has worked without a hitch. Quote Link to comment Share on other sites More sharing options...
rkmcswain Posted October 22, 2009 Share Posted October 22, 2009 (load "ReMark.lsp "") Been doing this since release 9 and it has worked without a hitch. Been doing what exactly? Quote Link to comment Share on other sites More sharing options...
ReMark Posted October 22, 2009 Share Posted October 22, 2009 Sorry RKM I thought you were referring to my use of the acad200X.lsp file and the addition of the one line mentioned above. Never mind. It's been a long day again. Quote Link to comment Share on other sites More sharing options...
rkmcswain Posted October 22, 2009 Share Posted October 22, 2009 Sorry RKM I thought you were referring to my use of the acad200X.lsp file and the addition of the one line mentioned above. I was. So you have been editing "Acadr13.lsp", "Acadr14.lsp", "Acad2000.lsp", etc. every time you install a new release? That is why "Acad.lsp" and "acaddoc.lsp" were created, so you can use the same file over and over, independent of the version.... Quote Link to comment Share on other sites More sharing options...
ReMark Posted October 22, 2009 Share Posted October 22, 2009 Guilty as charged. I always said to myself "It's just one line." Quote Link to comment Share on other sites More sharing options...
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.