LISP loads then stops working

I've been working in ACAD for about 40 years and so have built up a huge collection of custom LISP routines that I use to as part of my work flow. When I start up Brics, it loads the default LISP and that then loads all the subsequent LISP files. They work great. However, if I open a second file or if I close the first file and open another file, the LISPs stop working. Is there a way in Brics to get it auto load the default LISP in every drawing startup?

Comments

  • I think lisp is per document, I think there’s a file where you can add stuff, maybe

    Program Files\Bricsys\BricsCADXX\Support\on_doc_load_default.lsp

  • on_doc_load_default.lsp & on_start_default.lsp shouldn't be used, these are reserved files for the use of Bricsys and maybe overwritten by them!

    User LISP file names to use are:

    • on_start.lsp (equivalent to acad.lsp). Loaded automatically on application startup.
    • on_doc_load.lsp (equivalent to acaddoc.lsp). Loaded automatically with each drawing opened.

    These Lisp need to be placed somewhere on your support file search path (SRCHPATH).

    Not recommened, but you can force on_start.lsp to load with each drawing by Setting ACADLSPASDOC = 1

    https://help.bricsys.com/en-us/document/system-variable-reference/a/acadlspasdoc-system-variable

    Jason Bourhill

    CAD Concepts Ltd

    cadconcepts.co.nz

  • aridzv
    edited October 29

    Hi.

    you have 2 options:

    1. as jason Bourhill wrote above - add a call to your main lisp to on_start.lsp & on_doc_load.lsp. that will call your lisp that load your lisp's both on startup & for every dwg load.
    2. use "APPLOAD" command. that command let you choose all the lisps that you want to load and set them to autoload for every drawing load. those lisp's calls are saved to a file name "appload.dfs" saved in: "C:\Users\User\AppData\Roaming\Bricsys\BricsCAD\V26x64\en_US". since you alredy have a lisp that load all your lisp's you will need to only load that lisp.

    Aridzv.

  • ALANH
    edited October 30

    To save some memory look into using the "Autoload" function in your single lisp that is loaded. when you type the command the lisp is loaded.

    (autoload "COPY0" '("COPY0"))
    (autoload "COPYCOMMAND" '("ZZZ"))
    (autoload "COVER" '("COVER"))
    (autoload "DIMFLIP" '("DIMFLIP"))
    (autoload "DRAWXFALL" '("DRAWXFALL"))