指定当版面配置的纸张大小与 PC3 文件的默认设置不同时,是否向用户发出警报。 支持的平台:仅窗口 属性值只读:不 类型:布尔
言论此属性的初始值为。True 例子工 务 局: 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"))) ) |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-1-8 19:03
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.