指定自动保存间隔(以分钟为单位)。 支持的平台:仅窗口 属性值只读:不 类型:整数 0 >= 自动保存间隔 <= 600 间隔等于 0 将禁用自动保存。 大于 0 的间隔会自动按指定的间隔保存图形。 言论此属性的初始设置为 120。 当您对图形进行更改时,计时器将立即启动。每当保存图形时,它都会重置并重新启动。当前图形将保存为auto.sv$,除非您使用属性指定了其他名称。AutoSavePath 注意:此属性还由 SAVETIME 系统变量控制。ISAVEBAK 系统变量(使用属性设置)提高了增量保存的速度,尤其是对于较大的图形。ISAVE% 系统变量(使用属性设置)确定图形中容许的浪费空间量。CreateBackupIncrementalSavePercent
例子工 务 局: 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))) ) |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-1-8 19:12
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.