DisplayPlotPreview Method (ActiveX)

Displays the Plot Preview dialog box with the full view preview.

Supported platforms: Windows only

Signature

VBA:

object.DisplayPlotPreview Preview
object

Type: Plot

The object this method applies to.

Preview

Access: Input-only

Type: AcPreviewMode enum

  • acFullPreview
  • acPartialPreview

Return Value (RetVal)

No return value.

Remarks

The preview is invoked on the active layout.

Full preview displays the drawing on the screen as it will appear when plotted on paper. This requires a regeneration of the drawing. It is faster than the normal plot regeneration because AutoCAD performs no vector sorting or optimization.

The NumberOfCopies property and SetLayoutsToPlot method settings are ignored during the call to this method.

This method is not available while in batch mode and will return E_FAIL if called in batch mode.

The associated drawing is made active when this method is called. This drawing will remain active after completion of the DisplayPlotPreview method.

This method puts the associated drawing into a special display mode that can only be exited by user interaction. Thus, upon successful return from the DisplayPlotPreview method, the associated drawing will be active, and will be left in plot preview display mode.

Examples

VBA:

Sub Example_DisplayPlotPreview()
    ' This example creates a circle and then performs
    ' a plot preview.
    
    ' Create the circle
    Dim circleObj As AcadCircle
    Dim center(0 To 2) As Double
    Dim radius As Double
    center(0) = 2: center(1) = 2: center(2) = 0
    radius = 1
    Set circleObj = ThisDrawing.modelSpace.AddCircle(center, radius)
    ZoomAll
    
    ' Preview the plot of the circle
    ThisDrawing.ActiveLayout.ConfigName = "DWG to PDF.pc3"
    ThisDrawing.Plot.DisplayPlotPreview acFullPreview
        
End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_DisplayPlotPreview()
    ;; This example creates a circle and then performs
    ;; a plot preview.
    (setq acadObj (vlax-get-acad-object))
    (setq doc (vla-get-ActiveDocument acadObj))
    
    ;; Create the circle
    (setq center (vlax-3d-point 2 2 0)  
          radius 1)
  
    (setq modelSpace (vla-get-ModelSpace doc))  
    (setq circleObj (vla-AddCircle modelSpace center radius))
    (vla-ZoomAll acadObj)
    
    ;; Preview the plot of the circle
    (vla-put-ConfigName (vla-get-ActiveLayout doc) "DWG to PDF.pc3")
    (vla-DisplayPlotPreview (vla-get-Plot doc) acFullPreview)
)