Specifies whether or not to plot using the plot styles that are applied to objects and defined in the plot style table.
Supported platforms: Windows only
VBA:
object.PlotWithPlotStyles
Type: Layout, PlotConfiguration
The objects this property applies to.
Read-only: No
Type: Boolean
The PlotWithPlotStyles property is equivalent to the Plot with Plot Styles option in AutoCAD.
VBA:
Sub Example_PlotWithPlotStyles() ' 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 ThisDrawing.ActiveLayout.ConfigName = "DWF6 ePlot.pc3" 'Show plot preview ThisDrawing.Plot.DisplayPlotPreview acFullPreview End Sub
Visual LISP:
(vl-load-com) (defun c:Example_PlotWithPlotStyles() ;; This example reads and changes the PlotWithPlotStyles ;; value, and shows a plot preview so the user can see the change. (setq acadObj (vlax-get-acad-object)) (setq doc (vla-get-ActiveDocument acadObj)) ;; Get the layout object (setq ACADLayout (vla-get-ActiveLayout doc)) ;; Read and display the original value (setq originalValue (vla-get-PlotWithPlotStyles ACADLayout)) (alert (strcat "The PlotWithPlotStyles value is set to: " (if (= originalValue :vlax-true) "True" "False"))) ;; Modify the PlotWithPlotStyles preference by changing the value (vla-put-PlotWithPlotStyles ACADLayout (if (= originalValue :vlax-true) :vlax-false :vlax-true)) (setq newValue (vla-get-PlotWithPlotStyles ACADLayout)) (alert (strcat "The PlotWithPlotStyles preference has been set to: " (if (= newValue :vlax-true) "True" "False"))) ;; Set an output device current (if (= (strcase (vla-get-ConfigName (vla-get-ActiveLayout doc))) "NONE") (vla-put-ConfigName (vla-get-ActiveLayout doc) "DWF6 ePlot.pc3") ) ;; Show plot preview (vla-DisplayPlotPreview (vla-get-Plot doc) acFullPreview) )