Autodesk Technology Managers Forum
Share your knowledge, ask questions, and engage with fellow CAD/BIM Managers.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to load lisp every time?

10 REPLIES 10
Reply
Message 1 of 11
tim.turner
10212 Views, 10 Replies

How to load lisp every time?

Does anyone know how to get a lisp file to load every time in Autocad 2015? All files loaded fine in 2012, skipped 2013 and 2014. The directories are pathed in the support file locations. The directories are pathed in the trusted file locations.  Tried them in the appload startup suit and they will not load. Tried them in the CUI lisp load section and they will not load. Avoided the mnl file because of the message at installation. Pasting the code into the acaddoc.lsp seemed to work for several days but now it will not load. Have copied the text from acaddoc.lsp into the VLIDE and checked for errors and none were found. There seems to be no consistency in when the acadoc.lsp loads and when it will not. This is really ridiculous.

10 REPLIES 10
Message 2 of 11
apjones
in reply to: tim.turner

Have you checked your trusted paths?
Pete

>Please Accept as Solution and give Kudos as appropriate to further enhance these forums. Thank you!
Message 3 of 11
tim.turner
in reply to: apjones

Yes, checked those. I guess 2015 needs to be from a clean install and then build it up to see what works but darn it if you have an appload function it should work. We don't have a cad manager to work on it and we have the good fortune of being too busy for me to mess with it but I have come to depend on the lisp functions. I guess I will just have to keep a directory open to drag and drop as needed... hey new functionality... "manual demand load" 😞
Message 4 of 11
apjones
in reply to: tim.turner

Try adding this to your acad.lsp file: (vl-load-all "lispname.lsp")
Pete

>Please Accept as Solution and give Kudos as appropriate to further enhance these forums. Thank you!
Message 5 of 11
tim.turner
in reply to: apjones

Using findfile I realize that only acad2015.lsp and acad2015doc.lsp are loading. I have a little 5 line routine that zoons to extents and then zooms back out by 10%. I put that in the acad2015.lsp, restart Autocad and it doesn't work but findfile says it is loaded. Next I put it in acad2015doc.lsp and open a new file, doasn't work, I drag and drop acad2015.doc.lsp in manually, it still doesn't work. I drag and drop the individual zoom routine in manually and bang, works like a charm. I can't believe my install is so messed up no one else is having this problem. Have already done one reinstall trying to fix a support request problem that they said they could not replicate.

 

Message 6 of 11
apjones
in reply to: tim.turner

If you have the file acad.lsp in the working path, AutoCAD will automatically load that file when ACAD is opened. We use that to auto-load many of our support files.

If you don’t have an acad.lsp file you can create on using notepad.

If you want to use the snippet I sent earlier, place this line and the previous code snippet in the file like this:

(vl-load-com)
(vl-load-all "filename1.lsp")
(vl-load-all "filename2.lsp")
(vl-load-all "filename3.lsp")

This will load the listed files in the current drawing and any drawings opened thereafter in the session.
Pete

>Please Accept as Solution and give Kudos as appropriate to further enhance these forums. Thank you!
Message 7 of 11
dgorsman
in reply to: tim.turner

acadXXXX.lsp and acaddocXXXX.lsp shouldn't be modified - they are considered application-only files.  In later releases there are additional hard-wired security features that prevent them from being loaded from locations other than where they were installed.  The approved method is to create your own acad.lsp and acaddoc.lsp files with various (defun ....)'s and other functions calls and locate them in your system within the Trusted Paths locations.

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
"I don't know" is the beginning of knowledge, not the end.


Message 8 of 11
jest2525
in reply to: tim.turner

Consider ACADDOC.lsp...

 

I used to use a single lisp file that would load all my definitions.  Previously, it was loaded via the Startup Suite.  In version 2015 that method became glitchy and rarely loaded.  The fix was to rename that file to ACADDOC.lsp and drop in into the path (in my case:  C:\Program Files\Autodesk\AutoCAD 2015\Support ).  Problem solved.  All my lisp routines now load and run as they should.

Message 9 of 11
tim.turner
in reply to: jest2525

Most of my issues were solved when I finally discovered that 2015 was actually deleting support paths it did not find due to the occasional morning I started Autocad prior to the network drives loading. That was a nice little change not listed in the new features. I have also abandoned the startup suite. I still load some lisp with the enterprise cui to keep them seperate. Not sure who to credit with a solution, everybody helped. Thanks.

Message 10 of 11
BNewman777
in reply to: tim.turner

I am running AutoCAD 2015 for Windows 8, and this is what I did to get acad.lsp to load lisp routines for every drawing session.

 

1. created a text file, using notepad, called acad.lsp that looks exactly like this:

 

    (load "lisproutine1")
    (load "lisproutine2")
    (load "lisproutine3")

 

2. turned on Windows file name extensions to make sure the new acad.lsp file had the .lsp file extension.

 

3. moved the new acad.lsp and the three lisp files (lisproutine1.lsp, lisproutine2.lsp, and lisproutine3.lsp) to:

    C:/Program Files/Autodesk/AutoCad 2015/Support

 

4. restarted AutoCad

 

I believe that I have used this method for every version of AutoCAD since release 11.

 

Message 11 of 11
wilmath
in reply to: BNewman777

This is an old thread but it pops up in searches so I am going to toss in a detail.

The acad.lsp file works  but when you create it you need to include the file type in the load command for each lisp.

 

 

  (load "lisproutine1.lsp")
    (load "lisproutine2.lsp")
    (load "lisproutine3.lsp")

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Administrator Productivity


Autodesk Design & Make Report