Simple lisp file question

Discussion in 'AutoCAD' started by John Webb, Sep 15, 2006.

  1. John Webb

    John Webb Guest

    I have a lisp file I would like to load and run, but I have not done this
    since R12, when it was simple. I'm using 2006 and am confused as to which
    folder I should place the lisp file into so I can load it and then type it
    into the command line to run it.
     
    John Webb, Sep 15, 2006
    #1
  2. Unless they've done something really stupid (I haven't seen 2006) you can
    put it wherever you want.

    as of 2005:

    APPLOAD used to load it for you on a sessional basis.For automatic loading
    you would have to modify the acaddoc.lsp file.

    See your help on how to do that.
     
    Michael Bulatovich, Sep 15, 2006
    #2
  3. John Webb

    Dr Fleau Guest

    Real easy:
    1. Create folder called "LISP" (or Cream Cheese if you want, but it might
    be distracting) next to your Support Folder (look in Options)
    2. Save all your custom lisp files in there.
    3. Make sure you add the LISP folder in your ACAD search path (again, in
    Options)
    Now your files are accessible, but will need to be loaded prior to each
    first use, every session.
    Optional -->
    4. In ACAD, type APPLOAD. You can put all your most-used favorite files
    in the Startup suite. This way, they get loaded every time you open a
    drawing.
    5. You can create a dump lisp file that contains calls to every other
    function. Like this:

    (DEFUN c:ligne_axecall ()
    (LOAD "C:/Program Files/Autodesk/Acadm 2006/Acadm/LISP/Ligne_axe.lsp"
    ) ;_ end of LOAD
    (c:ligne_axe)
    ) ;_ END defun

    (DEFUN c:clefcall ()
    (LOAD "C:/Program Files/Autodesk/Acadm 2006/Acadm/LISP/clef.lsp"
    ) ;_ end of LOAD
    (c:clef)
    ) ;_ END DEFUN

    (DEFUN c:cusextcall ()
    (LOAD "C:/Program Files/Autodesk/Acadm 2006/Acadm/LISP/cusext.lsp"
    ) ;_ end of LOAD
    (c:cusext)
    ) ;_ END DEFUN

    (DEFUN c:drillpointcall ()
    (LOAD "C:/Program Files/Autodesk/Acadm 2006/Acadm/LISP/dp.lsp"
    ) ;_ end of LOAD
    (c:dp)
    ) ;_ END DEFUN

    and then create buttons/macros that call (for example) "c:ligne_axecall" or
    (OTOH) "c:cusextcall" or even (going on a limb here) "c:drillpointcall"
    Only 1 file is actually loaded upon opening, all the only others when
    needed, automatically.

    Dr Fleau
    We are born naked, cold and starving. Then things get worse.
     
    Dr Fleau, Sep 15, 2006
    #3
  4. John Webb

    John Webb Guest

    Thank you both for the help. It would have taken me a long time to glean
    this information from the help files.
    John
     
    John Webb, Sep 16, 2006
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.