View Full Version : LISP Loading Order
david.brissenden
2008-11-27, 12:10 PM
As far as I can see, acad2008.LSP should be loaded when autocad starts and acad2008doc.lsp is loaded when a document is opened.
I have added this code to the end of acad.lsp:
(setvar "filedia" 0)
(command "_VBALOAD""print.dvb")
(setvar "filedia" 1)
I put the following code at the end of acad2008doc.lsp:
(defun c:PrintA3()
(command "_-VBARUN" "PrintA3")
)
(defun c:PrintA4()
(command "_-VBARUN" "PrintA4")
)
The trouble is that when I open another drawing I get an error saying that print.dvb is already loaded but I haven't shut down acad I only opened another file which shouldn't try and load the dvb file again.
Does anyone know why it is doing this?
Thanks
rkmcswain
2008-11-27, 03:13 PM
"acad2008.lsp" is loaded when AutoCAD starts.
"acad2008doc.lsp" is loaded each time a drawing is loaded
Neither of these files should be modified by the end user - because your changes are subject to being overwritten by AutoCAD. Ignore these files and make your additions and/or changes to "acad.lsp" and "acaddoc.lsp", which perform the same functions. These two files are controlled by the user.
Also, make sure ACADLSPASDOC is set to 0. Try all this and report back.
david.brissenden
2008-11-27, 03:36 PM
"acad2008.lsp" is loaded when AutoCAD starts.
"acad2008doc.lsp" is loaded each time a drawing is loaded
Neither of these files should be modified by the end user - because your changes are subject to being overwritten by AutoCAD. Ignore these files and make your additions and/or changes to "acad.lsp" and "acaddoc.lsp", which perform the same functions. These two files are controlled by the user.
Also, make sure ACADLSPASDOC is set to 0. Try all this and report back.
I cannot find either acad.lsp or acad2008doc.lsp on the hard drive or under any of the support paths!!
Where should they be? perhaps I should create them?
kennet.sjoberg
2008-11-27, 07:11 PM
I cannot find either acad.lsp or acad2008doc.lsp on the hard drive or under any of the support paths!!
Where should they be? perhaps I should create them?
Q1 in AutoCADs searh path
Q2 Yes, you can if necessary
but use "acad.lsp" and/or "acaddoc.lsp"
You can also for curiosity or debugging reason add in the file
the first line:
(princ "\nStart of file blabla.lsp\n" )
the last line:
(princ "\nEnd of file blabla.lsp\n" )
: ) Happy Computing !
kennet
david.brissenden
2008-11-28, 08:21 AM
Thanks very much for your help guys. :)
rkmcswain
2008-11-28, 04:07 PM
I cannot find either acad.lsp or acad2008doc.lsp on the hard drive or under any of the support paths!! "acad.lsp" and "acaddoc.lsp" are user files. You create and maintain them.
"acad200x.lsp" and "acad200xdoc.lsp" are application files. They come with AutoCAD. Unless they have been deleted, they are there. What does (findfile "acad2008doc.lsp") return at the command line? (it should be in C:\Program Files\AutoCAD 2008\Support)
vBulletin® v3.6.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.