HistoryLines Example |
Using Programming Languages other than VBA
Sub Example_HistoryLines() ' This example returns the current setting of ' HistoryLines. It then changes the value, and finally ' it resets the value back to the original setting. Dim preferences As AcadPreferences Dim currHistoryLines As Integer Set preferences = ThisDrawing.Application.preferences ' Retrieve the current HistoryLines value currHistoryLines = preferences.DISPLAY.HistoryLines MsgBox "The current value for HistoryLines is " & preferences.DISPLAY.HistoryLines, vbInformation, "HistoryLines Example" ' Change the value for HistoryLines preferences.DISPLAY.HistoryLines = 42 MsgBox "The new value for HistoryLines is " & preferences.DISPLAY.HistoryLines, vbInformation, "HistoryLines Example" ' Reset HistoryLines to its original value preferences.DISPLAY.HistoryLines = currHistoryLines MsgBox "The HistoryLines value is reset to " & preferences.DISPLAY.HistoryLines, vbInformation, "HistoryLines Example" End Sub
Comments? |