DockedVisibleLines Example

Using Programming Languages other than VBA

Sub Example_DockedVisibleLines()
	' This example returns the current setting of
	' DockedVisibleLines. It then changes the value, and finally
	' it resets the value back to the original setting.

	Dim preferences As AcadPreferences
	Dim currDockedVisibleLines As Integer

	Set preferences = ThisDrawing.Application.preferences

	' Retrieve the current DockedVisibleLines value
	currDockedVisibleLines = preferences.DISPLAY.DockedVisibleLines
	MsgBox "The current value for DockedVisibleLines is " & preferences.DISPLAY.DockedVisibleLines, vbInformation, "DockedVisibleLines Example"

	' Change the value for DockedVisibleLines
	preferences.DISPLAY.DockedVisibleLines = 15
	MsgBox "The new value for DockedVisibleLines is " & preferences.DISPLAY.DockedVisibleLines, vbInformation, "DockedVisibleLines Example"

	' Reset DockedVisibleLines to its original value
	preferences.DISPLAY.DockedVisibleLines = currDockedVisibleLines
	MsgBox "The DockedVisibleLines value is reset to " & preferences.DISPLAY.DockedVisibleLines, vbInformation, "DockedVisibleLines Example"
End Sub

 

   Comments?