launch lisp routine automatically

Discussion in 'AutoCAD' started by sien, Jun 23, 2004.

  1. sien

    sien Guest

    Hello,

    I have to write a routine which converts dsd to dwf. This routine
    should run every night as a task.
    It seems that there is a bug (fatal error) in vba with the publish
    command:

    ThisDrawing.SendCommand "0" & vbCr
    ThisDrawing.SendCommand "-PUBLISH" & vbCr
    ThisDrawing.SendCommand "c:\temp.DSD" & vbCr

    so I write the routine in lisp:

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


    This lisp routine works perfect. I just don't know how I can run this
    lisp routine automatically every night.

    Any suggestions will be appreciated. Thanks in advance.
     
    sien, Jun 23, 2004
    #1
  2. sien

    Guest Guest

    Guest, Jun 26, 2004
    #2
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.