See the top rated post in this thread. Click here

Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: LISP Not Working After Opening A Drawing - Using ACADDOC.LSP

  1. #1
    I could stop if I wanted to
    Join Date
    2001-11
    Posts
    236
    Login to Give a bone
    0

    Default LISP Not Working After Opening A Drawing - Using ACADDOC.LSP

    Sad in 2014 I am still fighting with the better way to load all my lisps. Maybe I am not typing the "right" search keyword.
    I am trying to start using the ACADDOC.LSP. Created one, put it in the main folder with ACAD.EXE, open AutoCAD (2014),
    all the LISPs I imputed in ACADDOC work.

    However, when I open a drawing file, no LISP work. What am I failing to do?

    Typical entry in ACADDOC.LSP is:

    (load "L:\\autocad\\profiles\\oka\\okacadd\\lisp\\CW.lsp" "CW Failed to Load.")
    OR
    (load "CW.lsp" "CW Failed to Load.")

    Typical LISP location example:
    L:\AutoCAD\Profiles\Oka\OkaCADD\LISP\CW.LSP

    I have the location of all my LISP files in the search path. Does it really mater where the Support File Search Path is in the list?
    I tried locating it in the middle and at the end, still opening a file disables the LISPs in the ACADDOC.LSP.

    Thanks.
    Last edited by omorah; 2014-01-29 at 06:39 PM.

  2. #2
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,714
    Login to Give a bone
    0

    Default Re: LISP Not Working After Opening A Drawing - Using ACADDOC.LSP

    Did you configure the new SECURELOAD, and TRUSTEDPATHS system variables?

    If not, see the link in my signature for more information.

    HTH
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  3. #3
    I could stop if I wanted to
    Join Date
    2001-11
    Posts
    236
    Login to Give a bone
    0

    Default Re: LISP Not Working After Opening A Drawing - Using ACADDOC.LSP

    Quote Originally Posted by BlackBox View Post
    Did you configure the new SECURELOAD, and TRUSTEDPATHS system variables?

    If not, see the link in my signature for more information.

    HTH
    No, I did not configure the SECURELOAD (did not know it exists).

    1. Bye the way, I just did a full search and found these: ACAD2014.LSP & ACAD2014DOC.LSP. Am I using the wrong "...DOC.LSP" file all along?
    Guess the "ACADDOC.LSP" file is from previous versions?

    2. Should the "...DOC.LSP" file be located in the main AutoCAD folder where the ACAD.EXE is or should it be in the SUPPORT folder?

    Thanks again.

  4. #4
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,714
    Login to Give a bone
    0

    Default Re: LISP Not Working After Opening A Drawing - Using ACADDOC.LSP

    Quote Originally Posted by omorah View Post
    No, I did not configure the SECURELOAD (did not know it exists).
    No worries; these system variables were introduced in 2014.

    Quote Originally Posted by omorah View Post
    1. Bye the way, I just did a full search and found these: ACAD2014.LSP & ACAD2014DOC.LSP. Am I using the wrong "...DOC.LSP" file all along?
    Guess the "ACADDOC.LSP" file is from previous versions?

    2. Should the "...DOC.LSP" file be located in the main AutoCAD folder where the ACAD.EXE is or should it be in the SUPPORT folder?
    Acad####.lsp, and Acad####Doc.lsp are AutoCAD-owned files that have been part of the product's startup mechanism for longer than I've know what AutoCAD is... Do not modify these files. Also worthy of note, is that starting with 2014, these files can no longer be moved to a custom folder. If not found in the default folder, they are not loaded at startup at all - even if moved to another folder within the SFSP.

    Continue to employ the user-owned Acad.lsp, and AcadDoc.lsp files as needed, as these will not be potentially overwritten with each product update, etc. These files may be located anywhere within the Support File Search Path (SFSP), but it is generally recommended that you place them within a folder at the top of your SFSP to avoid accidental loading of the wrong one by mistake, as only the first one found within SFSP is loaded.

    HTH
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  5. #5
    I could stop if I wanted to
    Join Date
    2001-11
    Posts
    236
    Login to Give a bone
    0

    Default Re: LISP Not Working After Opening A Drawing - Using ACADDOC.LSP

    With your replies, it looks like I am doing what I am supposed to do (except not doing anything with ACAD.LSP).

    - I have the ACADDOC.LSP in: "C:\Program Files\Autodesk\AutoCAD 2014\ACADDOC.LSP"

    - All the LISPs in ACADDOC.LSP are on the network folder which in turn is in my Support File Search Path.

    - When AutoCAD is opened, the routines work.

    - When I open a drawing file, none of the routines work.

    - But when I use the Load/Unload Applications & Startup Suite, all the routines work.

  6. #6
    AUGI Addict
    Join Date
    2015-12
    Posts
    2,095
    Login to Give a bone
    0

    Default Re: LISP Not Working After Opening A Drawing - Using ACADDOC.LSP

    Time to do some error checking ie. are they actually being loaded? If not, why? Secure load fail? Invalid LISP file? Invalid path? Proper ACADDOC.LSP file being loaded? Third-party program like AutoPLANT or PDMS P&ID preventing your stuff from being loaded?

    Stupid question time: SDI or multiple document mode? I've had problems with SDI mode and ACADDOC.LSP before.
    (other)Stupid question: you don't have a virus problem with the replicating ACAD/ACADDOC.LSP files do you?

  7. #7
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,714
    Login to Give a bone
    0

    Default Re: LISP Not Working After Opening A Drawing - Using ACADDOC.LSP

    Adding to Dgorsman's comments, try using FINDFILE LispFunction in each drawing to verify that YOUR AcadDoc.lsp file is found first.
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  8. #8
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,803
    Login to Give a bone
    1

    Default Re: LISP Not Working After Opening A Drawing - Using ACADDOC.LSP

    Quote Originally Posted by omorah View Post
    With your replies, it looks like I am doing what I am supposed to do (except not doing anything with ACAD.LSP).
    Note: Acaddoc.lsp is loaded each time a drawing is loaded. Acad.lsp is only loaded once at application launch (unless you set acadlspasdoc = 1, which is not recommended) [1]

    Quote Originally Posted by omorah View Post
    - I have the ACADDOC.LSP in: "C:\Program Files\Autodesk\AutoCAD 2014\ACADDOC.LSP"
    My suggestion is to create a new directory (maybe C:\CADSTUFF) and put acaddoc.lsp in there, THEN add this path to the TOP of your support file search path.

    Quote Originally Posted by omorah View Post
    - All the LISPs in ACADDOC.LSP are on the network folder which in turn is in my Support File Search Path.
    External lisp files do not have to be in the SFSP, but it doesn't hurt.

    Quote Originally Posted by omorah View Post
    - When AutoCAD is opened, the routines work.
    - When I open a drawing file, none of the routines work.
    - But when I use the Load/Unload Applications & Startup Suite, all the routines work.
    Code:
    ;;;At the TOP of your acaddoc.lsp file, put this:
    (princ "\nLoading acaddoc.lsp")
    
    ;;;At the BOTTOM of the file, put this:
    (princ "\nAcaddoc.lsp successfully loaded")
    Look for these lines to be printed on the command line when you open AutoCAD and when you open a drawing.
    If the top one is printed, then you know the file is being loaded.
    If the bottom one is missing, then something in your code is failing.
    R.K. McSwain | CAD Panacea |

  9. #9
    I could stop if I wanted to
    Join Date
    2001-11
    Posts
    236
    Login to Give a bone
    0

    Default Re: LISP Not Working After Opening A Drawing - Using ACADDOC.LSP

    Quote Originally Posted by dgorsman View Post
    Time to do some error checking ie. are they actually being loaded? If not, why? Secure load fail? Invalid LISP file? Invalid path? Proper ACADDOC.LSP file being loaded? Third-party program like AutoPLANT or PDMS P&ID preventing your stuff from being loaded?
    In my previous post, I showed you all the wrong information. When I looked at the ACADDOC.LSP, I had spaces before quotes where they should not be so I got all the imputed lines corrected. Still that did not fix the issue (but at least one error fixed).


    Quote Originally Posted by rkmcswain View Post

    My suggestion is to create a new directory (maybe C:\CADSTUFF) and put acaddoc.lsp in there, THEN add this path to the TOP of your support file search path.

    External lisp files do not have to be in the SFSP, but it doesn't hurt.

    Code:
    ;;;At the TOP of your acaddoc.lsp file, put this:
    (princ "\nLoading acaddoc.lsp")
    
    ;;;At the BOTTOM of the file, put this:
    (princ "\nAcaddoc.lsp successfully loaded")
    Look for these lines to be printed on the command line when you open AutoCAD and when you open a drawing.
    If the top one is printed, then you know the file is being loaded.
    If the bottom one is missing, then something in your code is failing.
    This is the icing on the cake to show whether the file loaded successfully!

    Did some 'house keeping' with file paths making sure all paths are valid and pointing to the correct reference.

    Quote Originally Posted by BlackBox View Post
    Did you configure the new SECURELOAD, and TRUSTEDPATHS system variables?

    If not, see the link in my signature for more information.

    HTH
    The SECURELOAD and TRUSTEDPATHS were the culprits. I set my SECURELOAD to "2" and added the LISP file path to the trusted path referenced folder.
    Voila, all is well now and working after opening a drawing file.

    Folks, I sure appreciate all your help and time in helping me solve this issue.
    Thanks.

  10. #10
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,714
    Login to Give a bone
    0

    Default Re: LISP Not Working After Opening A Drawing - Using ACADDOC.LSP

    Quote Originally Posted by omorah View Post
    The SECURELOAD and TRUSTEDPATHS were the culprits. I set my SECURELOAD to "2" and added the LISP file path to the trusted path referenced folder.
    Voila, all is well now and working after opening a drawing file.

    Folks, I sure appreciate all your help and time in helping me solve this issue.
    Thanks.
    No worries; We're happy to help.

    Cheers
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

Page 1 of 2 12 LastLast

Similar Threads

  1. View XREFS in a Drawing Without Opening the Host Drawing
    By Wish List System in forum AutoCAD Wish List
    Replies: 1
    Last Post: 2013-11-27, 01:23 PM
  2. Replies: 18
    Last Post: 2008-11-14, 12:40 AM
  3. Replies: 2
    Last Post: 2008-07-09, 12:17 AM
  4. Replies: 10
    Last Post: 2006-07-25, 11:43 PM
  5. Font changes while working in DWG or when Opening DWG
    By lamarche22 in forum AutoCAD LT - General
    Replies: 3
    Last Post: 2006-06-20, 05:43 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
  •