PlotLegacy Example

Using Programming Languages other than VBA

Sub Example_PlotLegacy()
	' This example reads and modifies the PlotLegacy
	' preference value.
	' When finished, this example resets the preference value back to
	' its original value.

	Dim ACADPref As AcadPreferencesOutput
	Dim originalValue As Boolean

	' Get the user preferences object

	Set ACADPref = ThisDrawing.Application.preferences.Output

	' Read and display the original value
	originalValue = ACADPref.PlotLegacy
	MsgBox "The PlotLegacy preference is set to: " & originalValue

	' Modify the PlotLegacy preference by toggling the value
	ACADPref.PlotLegacy = Not ACADPref.PlotLegacy

	MsgBox "The PlotLegacy preference has been set to: " & ACADPref.PlotLegacy

	' Reset the preference back to its original value
	ACADPref.PlotLegacy = originalValue
	MsgBox "The PlotLegacy preference was reset back to: " & originalValue
End Sub

 

   Comments?