PrinterPaperSizeAlert プロパティ(ActiveX)

レイアウトが PC3 ファイルの既定の設定とは異なる用紙サイズで設定されたときに、ユーザに警告を表示するかどうかを指定します。

サポートされているプラットフォーム: Windows のみ

構文と要素

VBA:

object.PrinterPaperSizeAlert
object

タイプ: PreferencesOutput

このプロパティが適用されるオブジェクト。

プロパティの値

読み込み専用: いいえ

タイプ: ブール型

注意

このプロパティの初期値は True です。

VBA:

Sub Example_PrinterPaperSizeAlert()
    ' This example reads and modifies the PrinterPaperSizeAlert
    ' preference value.
    ' When finished, this example resets the preference value back to
    ' its original value.
    
    Dim ACADPref As AcadPreferencesOutput
    Dim originalValue As Boolean
    
    ' Get the user preferences object

    Set ACADPref = ThisDrawing.Application.Preferences.Output
    
    ' Read and display the original value
    originalValue = ACADPref.PrinterPaperSizeAlert
    MsgBox "The PrinterPaperSizeAlert preference is set to: " & originalValue

    ' Modify the PrinterPaperSizeAlert preference by toggling the value
    ACADPref.PrinterPaperSizeAlert = Not ACADPref.PrinterPaperSizeAlert

    MsgBox "The PrinterPaperSizeAlert preference has been set to: " & ACADPref.PrinterPaperSizeAlert

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

Visual LISP:

(vl-load-com)
(defun c:Example_PrinterPaperSizeAlert()
    ;; This example reads and modifies the PrinterPaperSizeAlert
    ;; preference value.
    ;; 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))

    ;; Read and display the original value
    (setq originalValue (vla-get-PrinterPaperSizeAlert (vla-get-Output preferences)))
    (alert (strcat "The PrinterPaperSizeAlert preference is set to: " (if (= originalValue :vlax-true) "True" "False")))

    ;; Modify the PrinterPaperSizeAlert preference by toggling the value
    (vla-put-PrinterPaperSizeAlert (vla-get-Output preferences) (if (= originalValue :vlax-true) :vlax-false :vlax-true))
    (alert (strcat "The PrinterPaperSizeAlert preference has been set to: " (if (= (vla-get-PrinterPaperSizeAlert (vla-get-Output preferences)) :vlax-true) "True" "False")))

    ;; Reset the preference back to its original value
    (vla-put-PrinterPaperSizeAlert (vla-get-Output preferences) originalValue)
    (alert (strcat "The PrinterPaperSizeAlert preference was reset back to: " (if (= (vla-get-PrinterPaperSizeAlert (vla-get-Output preferences)) :vlax-true) "True" "False")))
)