lisp syntax

Discussion in 'AutoCAD' started by ylind, Jul 15, 2004.

  1. ylind

    ylind Guest

    would someone please refresh my memory as to "how to enter lisp Routines at the command line.

    I thought it was (load"routine.lsp") but that does not work.
    all my lisp routines are in the AutoCad R14/support folder

    TIA
     
    ylind, Jul 15, 2004
    #1
  2. I'm trying to remember if R14 allowed you to add the ".lsp" extension, and
    I'm coming up blank. In any case, it is unnecessary. Try (load "routine")

    -Randy
     
    Randy Richardson, Jul 15, 2004
    #2
  3. ylind

    ECCAD Guest

    Your syntax is OK. Should work.
    You could shorten it to: (load "routine") also. The .lsp is assumed.

    Bob
     
    ECCAD, Jul 15, 2004
    #3
  4. ylind

    BillZ Guest

    If your lisp file is not in the search path you will have to add that.

    (load "c:/mypath/routine")


    Bill
     
    BillZ, Jul 15, 2004
    #4
  5. ylind

    ECCAD Guest

    Perhaps you are not typing the filename correctly ?
     
    ECCAD, Jul 15, 2004
    #5
  6. ylind

    ECCAD Guest

    R14 did allow either way, with the .lsp or without.
    :)
    Bob
     
    ECCAD, Jul 15, 2004
    #6
  7. ylind

    BillZ Guest

    Also:

    You load the file name, not the routine name.


    Bill
     
    BillZ, Jul 15, 2004
    #7
  8. ylind

    Tom Smith Guest

    They're probably not on your search path. You either need to give an
    explicit path to the file, or (easier) puit them on your search path.

    It has always been possible to use either (load "routine") or (load
    "routine.lsp"). The lsp extension used to be assumed. Nowadays, if no
    extension is given, Acad will try to load routine.vlx, or routine.fas, or
    routine.lsp, in that order.

    All of this is covered in detail in the help files.
     
    Tom Smith, Jul 16, 2004
    #8
  9. ylind

    ECCAD Guest

    <snip>all my lisp routines are in the AutoCad R14/support folder<snip>
    Bob
     
    ECCAD, Jul 16, 2004
    #9
  10. ylind

    Tom Smith Guest

    <snip>all my lisp routines are in the AutoCad R14/support folder<snip>

    I'm aware of that, but it didn't actually specify that R14 was being run.

    He/she could be trying to load lisps from an old R14 folder into a newer
    version. That would explain the difficulty. If they are on the current
    version's support path, then the load syntax should work, with or without
    the lsp extension.

    As I said, lsp isn't exactly "assumed" anymore. It's now the last of three
    possible file extensions that Acad will try to load if the extension isn't
    specified.

    It's not clear what was meant by "doesn't work." Another person today
    expected a lisp to execute upon loading. Maybe this person has the same
    confusion. Or they might be confusing the filename with the routine name as
    Bill suggested.
     
    Tom Smith, Jul 16, 2004
    #10
  11. ylind

    ECCAD Guest

    Yes, there may be more to it..
    :)
     
    ECCAD, Jul 16, 2004
    #11
  12. ylind

    ylind Guest

    Thanks all - careful spelling, the right path, patience and good friendly help on this board work miracles.

    Thanks again - ylind.
     
    ylind, Jul 17, 2004
    #12
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.