IncrementalSavePercent Example

Using Programming Languages other than 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