Newbie question: Can I schedule a LISP-program ?

Discussion in 'AutoCAD' started by S Robbens, Jun 22, 2004.

  1. S Robbens

    S Robbens Guest

    Hi, I very new at this, so I ask a little help

    I've written a little program(Multiple_Publish.lsp) in lisp to publish
    all the .dsd files in a certain folder(C:/DSD_FILES/) using autocad
    2004:

    (initdia)
    (command "filedia" "0")
    (setq dsd_lijst (vl-directory-files "C:/DSD_FILES/" "*.dsd")) //
    (setq teller 0)
    (setq dsd_aantal (vl-list-length dsd_lijst))
    (while (< teller dsd_aantal)
    (setq dsd_path "C:/DSD_FILES/")
    (setq dsd_name (nth teller dsd_lijst))
    (setq dsd_file (strcat dsd_path dsd_name))
    (command "-publish" dsd_file)
    (setq teller (1+ teller))
    )

    This works, when I load this lisp-program in autocad, it starts
    running. But is there any way that I can schedule this lisp-program so
    it can run every night ? Can I schedule a .bat file ?

    Could somebody help me? TIA
     
    S Robbens, Jun 22, 2004
    #1
  2. If you give the function a name with a DEFUN, you could then invoke it with
    at
    the time you choose by issuing the command name. Putting the command
    in the startup routine would make it run when you start up.

    (Can't help with the timer thing...)
     
    Michael Bulatovich, Jun 22, 2004
    #2
  3. S Robbens

    bob.at Guest

    You cant schedule the lisp program for itself, because it needs
    AutoCAD to run. But you can do the following:
    - Ensure that the lisp is loaded and started, wehn AutoCAD starts
    - Make a bat file for starting AutoCAD
    - Schedule this bat file with winXP Task planing functions

    bob.at
     
    bob.at, Jun 22, 2004
    #3
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.