Plot Property (ActiveX)

Gets the Plot object for the document.

Supported platforms: Windows only

Signature

VBA:

object.Plot
object

Type: Document

The object this property applies to.

Property Value

Read-only: Yes

Type: Plot

The Plot object of the document.

Remarks

No additional remarks.

Examples

VBA:

Sub Example_Plot()
    ' This example sends a plot of the current drawing
    ' to a file.
    
    ThisDrawing.ActiveLayout.ConfigName = "DWF6 ePlot.pc3"
    
    ' Define the plot variable
    Dim currentPlot As AcadPlot
    Set currentPlot = ThisDrawing.Plot
    
    ' Define the output file name.
    ' Use "" to use the drawing name as the file name.
    ' Note: if the file name exists an error will be generated.
    Dim plotFileName As String
    plotFileName = "MyPlot"
    
    currentPlot.PlotToFile plotFileName
    
End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_Plot()
    ;; This example sends a plot of the current drawing
    ;; to a file.
    (setq acadObj (vlax-get-acad-object))
    (setq doc (vla-get-ActiveDocument acadObj))
  
    ;; Set a device current that outputs to a file
    (vla-put-ConfigName (vla-get-ActiveLayout doc) "DWF6 ePlot.pc3")

    ;; Define the plot variable
    (setq currentPlot (vla-get-Plot doc))
    
    ;; Define the output file name.
    ;; Use "" to use the drawing name as the file name.
    ;; Note: if the file name exists an error will be generated.
    (setq plotFileName "MyPlot")

    (vla-PlotToFile currentPlot plotFileName)
)