Results 1 to 6 of 6

Thread: LISP Loading Order

  1. #1
    Active Member
    Join Date
    2008-07
    Posts
    77

    Angry LISP Loading Order

    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:
    Code:
    (setvar "filedia" 0)
    (command "_VBALOAD""print.dvb")
    (setvar "filedia" 1)
    I put the following code at the end of acad2008doc.lsp:
    Code:
    (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

  2. #2
    Certified AUGI Addict rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Houston
    Posts
    7,520

    Default Re: LISP Loading Order

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

  3. #3
    Active Member
    Join Date
    2008-07
    Posts
    77

    Default Re: LISP Loading Order

    Quote Originally Posted by rkmcswain View Post
    "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?

  4. #4
    AUGI Addict kennet.sjoberg's Avatar
    Join Date
    2002-05
    Posts
    1,706

    Default Re: LISP Loading Order

    Quote Originally Posted by david.brissenden View Post
    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
    The essential thing is what you write in the post. . . .not the numbers of posts.

  5. #5
    Active Member
    Join Date
    2008-07
    Posts
    77

    Default Re: LISP Loading Order

    Thanks very much for your help guys.

  6. #6
    Certified AUGI Addict rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Houston
    Posts
    7,520

    Default Re: LISP Loading Order

    Quote Originally Posted by david.brissenden View Post
    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)
    Last edited by rkmcswain; 2008-11-28 at 02:09 PM. Reason: ..

Similar Threads

  1. Loading Lisps in Specific Order
    By gabecottam in forum AutoLISP
    Replies: 16
    Last Post: 2010-09-27, 04:51 PM
  2. LISP load order in relationship to CUI load order
    By Steve_Bennett in forum AutoCAD CUI Menus
    Replies: 8
    Last Post: 2007-01-19, 05:43 PM
  3. Lisp not loading with CUI
    By Borg in forum AutoCAD CUI Menus
    Replies: 5
    Last Post: 2006-03-31, 12:46 AM
  4. loading lisp
    By richardl in forum VBA/COM Interop
    Replies: 1
    Last Post: 2004-06-11, 05:37 PM
  5. loading lisp
    By richardl in forum AutoLISP
    Replies: 5
    Last Post: 2004-06-11, 02:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •