Does anyone know of a VLisp program that senses if the drawing database has

Discussion in 'AutoCAD' started by Andreas, Jul 23, 2004.

  1. Andreas

    Andreas Guest

    Does anyone know of a VLisp program that senses if the drawing database has
    changed and therefore to tricker an event (such as an AutoSave if the
    savetime has lapsed)? I simply will invoke something like (command "save"
    "Saved" "Y") if it is time to do an AutoSave and save the current file to a
    dwg called "SAVED.DWG".

    I know there is an AutoSave feature in AutoCAD but I want this option as
    well.

    ********** I am happy to pay for it if anyone has this. **********

    Thanks

    Andreas
     
    Andreas, Jul 23, 2004
    #1
  2. The DBMOD system variable knows whether the database (or some other things)
    has (have) changed. You can probably get a Vlisp or other routine to check
    the value of DBMOD periodically, with a reactor of some kind, but I would
    guess it has to be triggered by doing something else to react to. (I
    haven't worked with reactors, so I'm not sure what the possibilities are.)

    You could build such a check into some frequently-used command. Way back
    before there was AutoSave, I programmed our digitizer-puck's cancel button
    to cancel AND then check the drawing timer, and if it had exceeded some
    defined time, to remind you that you might want to save the drawing. That
    way any time you cancelled anything (which is frequent enough, especially
    since I built lots of common commands to repeat automatically), that check
    would be performed, but it never interfered with any command in progress
    since it was built to follow a cancel. Whenever you saved, it would reset
    the timer. It still left you the option not to save, if you had some reason
    not to, but at least you would be regularly reminded. But we dropped that
    once AutoSave came along.

    Maybe it's possible to redefine what AutoSave does. That would have the
    advantage that it would happen regularly without depending on any other
    particular thing to trigger it.

    Kent Cooper, AIA


    .....
     
    Kent Cooper, AIA, Jul 23, 2004
    #2
  3. Andreas

    Andreas Guest

    Thanks Kent. I used to have a command for Autosave as well back then but I
    also dropped it when Autosave came in. It also checked a whole lot of
    commands like erase, copy, move etc.... however I was hoping Vlisp will
    help. Unfortunately I am not up with VLISP enough to attempt it in reactors
    so I need a little head start from someone. At the end of the day we may
    have to go with the old routine. Thanks for the DBMOD hint as well.

    Andreas
     
    Andreas, Jul 24, 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.