Specifies the percentage of wasted space allowed in a drawing file.
Supported platforms: Windows only
VBA:
object.IncrementalSavePercent
Type: PreferencesOpenSave
The object this property applies to.
Read-only: No
Type: Integer
The valid range is 0 to 100.
The initial value of this property is 50.
When the specified percentage is reached, AutoCAD performs a full save instead of an incremental save. Full saves eliminate wasted space. If you set this property to 0, every save is a full save.
Although incremental saves increase the size of your drawing, do not set a very low value. For optimum performance, set the value to 50. If memory becomes an issue, set the value to 25. If you set the value to 20 or less, performance slows significantly. Low values lower the program's performance because AutoCAD performs time-consuming full saves more often.
VBA:
Sub Example_IncrementalSavePercent() ' This example returns the current setting of ' IncrementalSavePercent. It then changes the value, and finally ' it resets the value back to the original setting. Dim preferences As AcadPreferences Dim currIncrementalSavePercent As Integer Dim newIncrementalSavePercent As Integer Set preferences = ThisDrawing.Application.preferences ' Retrieve the current IncrementalSavePercent value currIncrementalSavePercent = preferences.OpenSave.IncrementalSavePercent MsgBox "The current value for IncrementalSavePercent is " & currIncrementalSavePercent, vbInformation, "IncrementalSavePercent Example" ' Change the value for IncrementalSavePercent newIncrementalSavePercent = 20 preferences.OpenSave.IncrementalSavePercent = newIncrementalSavePercent MsgBox "The new value for IncrementalSavePercent is " & newIncrementalSavePercent, vbInformation, "IncrementalSavePercent Example" ' Reset IncrementalSavePercent to its original value preferences.OpenSave.IncrementalSavePercent = currIncrementalSavePercent MsgBox "The IncrementalSavePercent value is reset to " & currIncrementalSavePercent, vbInformation, "IncrementalSavePercent Example" End Sub
Visual LISP:
(vl-load-com) (defun c:Example_IncrementalSavePercent() ;; This example returns the current setting of ;; IncrementalSavePercent. 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 IncrementalSavePercent value (setq currIncrementalSavePercent (vla-get-IncrementalSavePercent (vla-get-OpenSave preferences))) (alert (strcat "The current value for IncrementalSavePercent is " (itoa currIncrementalSavePercent))) ;; Change the value for IncrementalSavePercent (setq newIncrementalSavePercent 20) (vla-put-IncrementalSavePercent (vla-get-OpenSave preferences) newIncrementalSavePercent) (alert (strcat "The new value for IncrementalSavePercent is " (itoa (vla-get-IncrementalSavePercent (vla-get-OpenSave preferences))))) ;; Reset IncrementalSavePercent to its original value (vla-put-IncrementalSavePercent (vla-get-OpenSave preferences) currIncrementalSavePercent) (alert (strcat "The IncrementalSavePercent value is reset to " (itoa currIncrementalSavePercent))) )