Autosave Reactor

Discussion in 'AutoCAD' started by Andreas, Feb 4, 2005.

  1. Andreas

    James Allen Guest

    You're welcome. I bet you changed it to "C:\AutoSave", not "C:\AutoSave\".
    Thank you for helping refine my code. It hadn't occurred to me that the
    trailing delimiter in the directory path is optional. Hope this helps.

    James

    ;;; 'My' form
    (strcat (GetVar "savefilepath")
    "\\AutoSave "
    (GetVar "dwgname")
    )
    ;; - "C:\\\\AutoSave Drawing1.dwg"

    ;;; 'Your' form
    (strcat (GetVar "savefilepath")
    "AutoSave "
    (GetVar "dwgname")
    )
    ;; - "C:\\AutoSave Drawing1.dwg"

    ;;; Better form
    (strcat (vl-string-right-trim "\\" (GetVar "savefilepath"))
    "\\AutoSave "
    (GetVar "dwgname")
    )
    ;; - "C:\\AutoSave Drawing1.dwg"
     
    James Allen, Feb 9, 2005
    #21
  2. Andreas

    Andreas Guest

    Thanks James:

    Yes changed it to "C:\AutoSave", not "C:\AutoSave\".

    Will give the new code a go tomorrow.

    I am using the old code for now and have taken part of the autosave file
    name and mixed it with the DWGNAME to come up with a unique name for my
    copied sv$ file. This is so that if 2 dwgs are open the same time with the
    same name they will have unique backup files. It is possible in some
    situations that a dwgs named PLAN might exist in many different folders in
    some offices and opened the same time.

    So PLAN.DWG & PLAN.DWG will produce the followinf 2 sv$ files:
    PLAN_1_1_5863.sv$
    PLAN_1_1_5787.sv$

    Our routine will have files name created as such for each dwg open.
    AutoSave_1_1_5863_PLAN.dwg
    AutoSave_1_1_5787_PLAN.dwg

    You may not have this problem in your office but it does happen in ours.

    Thanks again.
    Andreas
     
    Andreas, Feb 10, 2005
    #22
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.