PlotWithPlotStyles Example

Using Programming Languages other than VBA

Sub Example_ShowPlotStyles()
	' This example reads and changes the PlotWithPlotStyles
	' value, and shows a plot preview so the user can see the change.

	Dim ACADLayout As ACADLayout
	Dim originalValue As Boolean

	' Get the layout object
	Set ACADLayout = ThisDrawing.ActiveLayout

	' Read and display the original value
	originalValue = ACADLayout.PlotWithPlotStyles
	MsgBox "The PlotWithPlotStyles value is set to: " & originalValue

	' Modify the PlotWithPlotStyles preference by changing the value
	ACADLayout.PlotWithPlotStyles = Not ACADLayout.PlotWithPlotStyles
	MsgBox "The PlotWithPlotStyles preference has been set to: " & ACADLayout.PlotWithPlotStyles

	'Show plot preview
	ThisDrawing.Plot.DisplayPlotPreview acFullPreview

End Sub

 

   Comments?