Auto-Start Lisp Help

Discussion in 'AutoCAD' started by Brockster, Sep 20, 2004.

  1. Brockster

    Brockster Guest

    Hello all. I have a real simple question. I have a lisp program I found on the internet that I need to self start once loaded. I've been delving into lisp here and there but I haven't run across the answer to this. The first line of the lisp is for example: (defun c:date (). I believe this is all you'll need to provide me an answer.

    Thanks in advance.
     
    Brockster, Sep 20, 2004
    #1
  2. Brockster

    R.K. McSwain Guest


    Remove (or comment out) the "(defun c:xxx ()" and the very last ")"
     
    R.K. McSwain, Sep 20, 2004
    #2
  3. Brockster

    Brockster Guest

    Perfect! Thanks again. }:)>
     
    Brockster, Sep 20, 2004
    #3
  4. Brockster

    Tom Smith Guest

    That will work but could have undesirable side effects, since it guarantees
    that all variables which were declared local are now globals. IMHO, a better
    approach is to leave the "(defun c:xxx ()" and the very last ")" alone, and
    instead add a new line at the very end, which says "(c:xxx)" -- c:xxx being
    whatever followed the defun.

    The difference is, instead of bursting the function definition, you leave it
    as is and simply execute it after it's defined.
     
    Tom Smith, Sep 23, 2004
    #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.