PlotToDevice Method (ActiveX)

Plots a layout to a device.

Supported platforms: Windows only

Signature

VBA:

RetVal = object.PlotToDevice([plotConfig])
object

Type: Plot

The object this method applies to.

plotConfig

Access: Input-only; optional

Type: String

The full path and file name of the PC3 file to use instead of the current configuration. If this parameter is not provided, the current configuration will be used. If the configuration file is not found at the specified path, AutoCAD will search the printer configuration path for the file before it defaults to the current configuration.

Return Value (RetVal)

Type: Boolean

Remarks

The drawing from which the plot is initiated must be active for the plot to succeed.

To plot in the foreground, you must set the AutoCAD BACKGROUNDPLOT system variable to 0. Otherwise, plotting occurs in the background.

The plot device is specified using the ConfigName property for the layout or plot configuration.

If the PC3 file specified or the current plot configuration contains plot-to-file information, this method may actually send the plot to a file instead of to a device. Be careful to review all current plot configuration information for the specified layout. To plot several layouts, you can use the SetLayoutsToPlot method before invoking the PlotToDevice method.

To create a new configured plotter (PC3) file, use the Add-a-Plotter wizard in AutoCAD. For more information about PC3 files, see the AutoCAD Online Help system.

Examples

VBA:

Sub Example_PlotToDevice()
    ' This example sends a plot of the current drawing
    ' to the default device for your system.
    
    ThisDrawing.ActiveLayout.ConfigName = "DWF6 ePlot.pc3"
    
    ThisDrawing.Plot.PlotToDevice
    
End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_PlotToDevice()
    ;; This example sends a plot of the current drawing
    ;; to the current device.
    (setq acadObj (vlax-get-acad-object))
    (setq doc (vla-get-ActiveDocument acadObj))

    (vla-put-ConfigName (vla-get-ActiveLayout doc) "DWF6 ePlot.pc3")

    (vla-PlotToDevice (vla-get-Plot doc))
)