DefaultOutputDevice Property (ActiveX)

Specifies the default output device for new layouts and model space.

Supported platforms: Windows only

Signature

VBA:

object.DefaultOutputDevice
object

Type: PreferencesOutput

The object this property applies to.

Property Value

Read-only: No

Type: String

The name of the default printer to use.

Remarks

You can specify any printers your computer is configured for, as well as any PC3 files in the plotter configuration path.

If no devices are on the system, this property will return "None."

Examples

VBA:

Sub Example_DefaultOutputDevice()
    ' This example reads and modifies the preference value that controls
    ' the default output device for new layouts and model space.
    ' When finished, this example resets the preference value back to
    ' its original value.
    
    Dim ACADPref As AcadPreferencesOutput
    Dim originalValue As Variant, newValue As Variant
    
    ' Get the output preferences object
    Set ACADPref = ThisDrawing.Application.preferences.Output
    
    ' Read and display the original value
    originalValue = ACADPref.DefaultOutputDevice
    MsgBox "The DefaultOutputDevice preference is: " & originalValue

    ' Modify the DefaultOutputDevice preference
    ACADPref.DefaultOutputDevice = "DWG to PDF.pc3"
    newValue = ACADPref.DefaultOutputDevice
    MsgBox "The DefaultOutputDevice preference has been set to: " & newValue

    ' Reset the preference back to its original value
    '
    ' * Note: Comment out this last section to leave the change to
    '         this preference in effect
    ACADPref.DefaultOutputDevice = originalValue
    MsgBox "The DefaultOutputDevice preference was reset back to: " & originalValue
End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_DefaultOutputDevice()
    ;; This example reads and modifies the preference value that controls
    ;; the default output device for new layouts and model space.
    ;; When finished, this example resets the preference value back to
    ;; its original value.
    (setq acadObj (vlax-get-acad-object))
    (setq preferences (vla-get-Preferences acadObj))
    
    ;; Get the output preferences object
    (setq ACADPref (vla-get-Output preferences))
    
    ;; Read and display the original value
    (setq originalValue (vla-get-DefaultOutputDevice ACADPref))
    (alert (strcat "The DefaultOutputDevice preference is: " originalValue))

    ;; Modify the DefaultOutputDevice preference
    (vla-put-DefaultOutputDevice ACADPref "DWG to PDF.pc3")
    (setq newValue (vla-get-DefaultOutputDevice ACADPref))
    (alert (strcat "The DefaultOutputDevice preference has been set to: " newValue))

    ;; Reset the preference back to its original value
    ;;
    ;; * Note: Comment out this last section to leave the change to
    ;;         this preference in effect
    (vla-put-DefaultOutputDevice ACADPref originalValue)
    (alert (strcat "The DefaultOutputDevice preference was reset back to: " originalValue))
)