新しいレイアウトおよびモデル空間の既定の出力デバイスを指定します。
サポートされているプラットフォーム: Windows のみ
読み込み専用: いいえ
タイプ: 文字列
使用するプリンタの既定の名前
コンピュータで設定が行われている任意のプリンタを指定してもよいし、プロッタ環境設定パスの任意の <I>.PC3</I> ファイルを指定することもできます。
システムにデバイスが存在しない場合、このプロパティは "None" を返します。
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))
)