See the top rated post in this thread. Click here

Results 1 to 9 of 9

Thread: 2018 Autocad Lisp routines (new ones) not loading

  1. #1
    Member
    Join Date
    2017-11
    Posts
    10
    Login to Give a bone
    0

    Default 2018 Autocad Lisp routines (new ones) not loading

    I have added some new lisp routines to my 2018 autocad lisp folder.

    I added them to the acad.lsp file & placed the routines in that same folder. (My search file search path is directed to the correct folder) my autocad is acting like it does not see them (the new lisp routines that I added). I created a new folder with different name and added it to the search paths & autocad sees all lisp routines new & old. Is there something that needs to change so that autocad 2018 will read all lisp routines with having to make new folder.

    This would not be that big of an issue but if I have to use new folder I will have to go on like 30+ computers and change them since we have our lisp routines on our network drive so everyone gets to use them.

    I appreciate anyone's help so I will not have to go to 30 computers & make that change every time I need to update our lisp routines.

  2. #2
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,805
    Login to Give a bone
    0

    Default Re: 2018 Autocad Lisp routines (new ones) not loading

    Did you add this folder to the list of Trusted Locations? (Options>Files>Trusted Locations)
    Or did you set SECURELOAD to 0?

    How are the files being told to load in ACAD.LSP?

    Like this?

    (load "mylisp")
    (load "yourlisp")
    (load "herlisp")

    Presuming that ACADLSPASDOC = 0 (which it should be), then ACAD.LSP only loads once per session.
    You need to be loading lisp files using ACADDOC.LSP.
    R.K. McSwain | CAD Panacea |

  3. #3
    Member
    Join Date
    2017-11
    Posts
    10
    Login to Give a bone
    0

    Default Re: 2018 Autocad Lisp routines (new ones) not loading

    Yes it is in trusted locations.

    The issue is I added lisp routines to my acad.lsp file:

    (load "jq" '("jq"))
    (load "jrvc" '("jrvc"))
    (load "jqldr" '("jqldr"))
    (load "jv" '("jv"))
    (load "jz" '("jz"))
    (load "ju" '("ju"))
    (load "jr" '("jr"))
    (load "jtu" '("jtu"))
    (load "rvcf" '("rvcf"))
    (load "rvcr" '("rvcr"))
    (load "rvcdcbf" '("rvcdcbf"))
    (load "rvcdcbr" '("rvcdcbr"))
    (load "rvcdcbnt" '("rvcdcbnt"))
    (load "rvcdcbntf" '("rvcdcbntf"))

    The bottom (4) I added today.

    The actual lisp files for these are in the same folder as acad.lsp file is (along with the top (10))

    ACADLSPASDOC = 1, on my computer (so it loads every time I open a drawing)

    When I start up autocad 2018 & I start typing rvc it does not show the (4) new lisp routines I made.

  4. #4
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,805
    Login to Give a bone
    0

    Default Re: 2018 Autocad Lisp routines (new ones) not loading

    Without having the files here - my next guess would be that it's failing at some point, at which time execution stops and everything below the fail point is ignored.

    I still say you should be using Acaddoc.lsp, not because what you are doing isn't working, but because now you have no way of loading things only at application startup - which is what acad.lsp is for.
    R.K. McSwain | CAD Panacea |

  5. #5
    All AUGI, all the time
    Join Date
    2003-07
    Posts
    560
    Login to Give a bone
    0

    Default Re: 2018 Autocad Lisp routines (new ones) not loading

    It may be loading the wrong Acad.lsp ie you need to search for all acad.lsp on your PC once found Autocad stops looking.

    Put this in (alert "correct acad.lsp found") if the message does not pop then its loading a different version check your support paths and look at top path first. Then next and so on for a acad.lsp

  6. #6
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,667
    Login to Give a bone
    1

    Default Re: 2018 Autocad Lisp routines (new ones) not loading

    To see if it's loading completely add
    Code:
    (princ "\n\"Acad.lsp\" loading. ")
    as the first line and
    Code:
    (princ (strcat "\n" (substr (vla-get-Caption (vlax-get-acad-object)) 1 (vl-string-search " - [" (vla-get-Caption (vlax-get-acad-object)))) (substr (getvar '_VERNUM) 2) " \"Acad.lsp\" loaded. "))
    (princ)
    as the last two lines.

    Enter
    Code:
    (findfile "acad.lsp")
    at the command line to see which acad.lsp file AutoCAD is using.

    Does
    Code:
    (load "rvcdcbf" '("rvcdcbf"))
    (load "rvcdcbr" '("rvcdcbr"))
    (load "rvcdcbnt" '("rvcdcbnt"))
    (load "rvcdcbntf" '("rvcdcbntf"))
    work if you load them at the command line?

  7. #7
    Member
    Join Date
    2017-11
    Posts
    10
    Login to Give a bone
    0

    Default Re: 2018 Autocad Lisp routines (new ones) not loading

    I put the (alert "correct acad.lsp found") in my acad.lsp file & it did pop up on screen. So it must be stopping at some spot & ignoring the rest.

    What is the acaddoc.lsp? and where would I put it & how to direct acad to it. Is it identical to my acad.lsp file and used same way? Sorry I do not get much new training at current job.

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

    Default Re: 2018 Autocad Lisp routines (new ones) not loading

    Did you put that as the last line in the file?

    Acaddoc.lsp can be located anywhere AutoCAD can find it (in the support file search path)
    Same as Acad.lsp.

    I suggest to create your own folder (i.e.: C:\CADSTUFF)
    Then put your files in here.
    Then add this path to the TOP of the support file search path.

    ACAD.LSP = executes once PER SESSION
    ACADDOC.LSP = executes each time a drawing is loaded.

    You typically load lisp files in ACADDOC.LSP because a loaded lisp file only works in the drawing in which it's loaded.
    So you have to load them for each drawing.

    Other things like DLL/ARX files, work across drawings, so they only need to be loaded once per SESSION.
    R.K. McSwain | CAD Panacea |

  9. #9
    All AUGI, all the time
    Join Date
    2003-07
    Posts
    560
    Login to Give a bone
    0

    Default Re: 2018 Autocad Lisp routines (new ones) not loading

    We do similar to rkmcswain with one subtle difference all our lisps to auto load are saved in one lisp file so we daisy chain it from say acaddoc.lsp (load "allmy lisps") much easier to control as we run a network so any new stuff goes in one file on the server. Upgrades are simple if required add 1 line to acaddoc.lsp.

Similar Threads

  1. Lisp routines not loading in 2013
    By thomas.stright in forum AutoLISP
    Replies: 1
    Last Post: 2012-09-04, 01:59 PM
  2. Replies: 5
    Last Post: 2006-12-08, 03:20 AM
  3. Loading LISP routines, is there a better way...
    By thomas.stright in forum AutoLISP
    Replies: 24
    Last Post: 2006-02-23, 05:00 PM
  4. Lisp routines not loading
    By stusic in forum AutoLISP
    Replies: 6
    Last Post: 2004-11-09, 06:39 AM
  5. Loading Lisp routines from a reactor
    By peter in forum AutoLISP
    Replies: 3
    Last Post: 2004-07-03, 03:11 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
  •