Specifies whether to alert the user when a layout is configured with a paper size that is different than the default setting for the PC3 file.
Supported platforms: Windows only
VBA:
object.PrinterPaperSizeAlert
Type: PreferencesOutput
The object this property applies to.
Read-only: No
Type: Boolean
The initial value for this property is 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")))
)