PlotType Property (ActiveX)

Specifies the type of layout or plot configuration.

Supported platforms: Windows only

Signature

VBA:

object.PlotType
object

Type: Layout, PlotConfiguration

The objects this property applies to.

Property Value

Read-only: No

Type: acPlotType enum

Remarks

Changes to this property will not be visible until after a regeneration of the drawing. Use the Regen method to regenerate the drawing.

The ViewToPlot property or SetWindowToPlot method must be called before you can set the PlotType to acView or acWindow.

Examples

VBA:

Sub Example_PlotType()
    ' This example reads and modifies the PlotType
    ' Layout value.
    ' When finished, this example resets the  value back to
    ' its original value.
    
    Dim ACADLayout As ACADLayout
    Dim originalValue As Integer
    
    ' Get the layout object
    Set ACADLayout = ThisDrawing.ActiveLayout
    
    ' Read and display the original value
    originalValue = ACADLayout.PlotType
    MsgBox "The PlotType value is set to: " & originalValue

    ' Modify the PlotType preference by toggling the value
    ACADLayout.PlotType = acExtents
    MsgBox "The PlotType preference has been set to: " & ACADLayout.PlotType

    ' Reset the preference back to its original value
    ACADLayout.PlotType = originalValue
    MsgBox "The PlotType preference was reset back to: " & originalValue
End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_PlotType()
    ;; This example reads and modifies the PlotType
    ;; Layout value.
    ;; When finished, this example resets the  value back to
    ;; its original value.
    (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-PlotType ACADLayout))
    (alert (strcat "The PlotType value is set to: " (itoa originalValue)))

    ;; Modify the PlotType preference by toggling the value
    (vla-put-PlotType ACADLayout acExtents)
    (alert (strcat "The PlotType preference has been set to: " (itoa (vla-get-PlotType ACADLayout))))

    ;; Reset the preference back to its original value
    (vla-put-PlotType ACADLayout originalValue)
    (alert (strcat "The PlotType preference was reset back to: " (itoa originalValue)))
)