指定备份文件的使用。 支持的平台:仅窗口 属性值只读:不 类型:布尔
言论此属性的初始值为。True 此属性通过创建备份文件 (.bak) 来提高增量保存的速度。操作系统复制文件数据以创建大型图形的备份文件,这占用了增量保存时间的主要部分。 谨慎:如果出现问题(例如保存过程中的电源故障),图形数据可能会丢失。
注意:此属性的值存储在 ISAVEBAK 系统变量中。
例子工 务 局: Sub Example_CreateBackup() ' This example returns the current setting of ' CreateBackup. It then changes the value, and finally ' it resets the value back to the original setting. Dim preferences As AcadPreferences Dim currCreateBackup As Boolean Set preferences = ThisDrawing.Application.preferences ' Retrieve the current CreateBackup value currCreateBackup = preferences.OpenSave.CreateBackup MsgBox "The current value for CreateBackup is " & preferences.OpenSave.CreateBackup, vbInformation, "CreateBackup Example" ' Change the value for CreateBackup preferences.OpenSave.CreateBackup = Not (currCreateBackup) MsgBox "The new value for CreateBackup is " & preferences.OpenSave.CreateBackup, vbInformation, "CreateBackup Example" ' Reset CreateBackup to its original value preferences.OpenSave.CreateBackup = currCreateBackup MsgBox "The CreateBackup value is reset to " & preferences.OpenSave.CreateBackup, vbInformation, "CreateBackup Example" End Sub Visual LISP: (vl-load-com) (defun c:Example_CreateBackup() ;; This example returns the current setting of ;; CreateBackup. 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 CreateBackup value (setq currCreateBackup (vla-get-CreateBackup (vla-get-OpenSave preferences))) (alert (strcat "The current value for CreateBackup is " (if (= currCreateBackup :vlax-true) "True" "False"))) ;; Change the value for CreateBackup (setq newCreateBackup (if (= currCreateBackup :vlax-true) :vlax-false :vlax-true)) (vla-put-CreateBackup (vla-get-OpenSave preferences) newCreateBackup) (alert (strcat "The new value for CreateBackup is " (if (= newCreateBackup :vlax-true) "True" "False"))) ;; Reset CreateBackup to its original value (vla-put-CreateBackup (vla-get-OpenSave preferences) currCreateBackup) (alert (strcat "The CreateBackup value is reset to " (if (= currCreateBackup :vlax-true) "True" "False"))) ) |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-1-8 19:46
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.