Specifies an automatic save interval in minutes.
Supported platforms: Windows only
VBA:
object.AutoSaveInterval
Type: PreferencesOpenSave
The object this property applies to.
Read-only: No
Type: Integer
0 >= AutoSaveInterval <= 600
An interval equal to 0 disables automatic save.
An interval greater than 0 automatically saves the drawing at the specified intervals.
The initial setting for this property is 120.
The timer starts as soon as you make a change to a drawing. It is reset and restarted whenever the drawing is saved. The current drawing is saved to auto.sv$ unless you have specified a different name using the AutoSavePath property.
VBA:
Sub Example_AutoSaveInterval()
    ' This example returns the current setting of
    ' AutoSaveInterval. It then changes the value, and finally
    ' it resets the value back to the original setting.
    
    Dim preferences As AcadPreferences
    Dim currAutoSaveInterval As Integer
    Dim newAutoSaveInterval As Integer
    
    Set preferences = ThisDrawing.Application.preferences
    
    ' Retrieve the current AutoSaveInterval value
    currAutoSaveInterval = preferences.OpenSave.AutoSaveInterval
    MsgBox "The current value for AutoSaveInterval is " & currAutoSaveInterval, vbInformation, "AutoSaveInterval Example"
    
    ' Change the value for AutoSaveInterval
    If currAutoSaveInterval = 0 Then
        newAutoSaveInterval = 10
    Else
        newAutoSaveInterval = 0
    End If
    preferences.OpenSave.AutoSaveInterval = newAutoSaveInterval
    MsgBox "The new value for AutoSaveInterval is " & newAutoSaveInterval, vbInformation, "AutoSaveInterval Example"
    
    ' Reset AutoSaveInterval to its original value
    preferences.OpenSave.AutoSaveInterval = currAutoSaveInterval
    MsgBox "The AutoSaveInterval value is reset to " & currAutoSaveInterval, vbInformation, "AutoSaveInterval Example"
End Sub
Visual LISP:
(vl-load-com)
(defun c:Example_AutoSaveInterval()
    ;; This example returns the current setting of
    ;; AutoSaveInterval. It then changes the value, and finally
    ;; it resets the value back to the original setting.
    (setq acadObj (vlax-get-acad-object))
    (setq preferences (vla-get-Preferences acadObj))
  
    ;; Retrieve the current AutoSaveInterval value
    (setq currAutoSaveInterval (vla-get-AutoSaveInterval (vla-get-OpenSave preferences)))
    (alert (strcat "The current value for AutoSaveInterval is " (itoa currAutoSaveInterval)))
    
    ;; Change the value for AutoSaveInterval
    (if (= currAutoSaveInterval 0)
        (setq newAutoSaveInterval 10)
        (setq newAutoSaveInterval 0)
    )
    (vla-put-AutoSaveInterval (vla-get-OpenSave preferences) newAutoSaveInterval)
    (alert (strcat "The new value for AutoSaveInterval is " (itoa newAutoSaveInterval)))
    
    ;; Reset AutoSaveInterval to its original value
    (vla-put-AutoSaveInterval (vla-get-OpenSave preferences) currAutoSaveInterval)
    (alert (strcat "The AutoSaveInterval value is reset to " (itoa currAutoSaveInterval)))
)