Jump to content

Acad2008.lsp


BILL WILLIAMS

Recommended Posts

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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....

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...