PrinterSpoolAlert 属性 (ActiveX)
指定当由于与 I/O 端口冲突而必须通过系统打印机对设备的输出进行假脱机处理时,是否向用户发出警报。 支持的平台:仅限 Windows 属性值只读:不 类型:枚举acPrinterSpoolAlert
言论此属性的初始值为 。acPrinterAlwaysAlert 例子VBA: Sub Example_PrinterSpoolAlert() ' This example reads and modifies the PrinterSpoolAlert ' preference value. ' When finished, this example resets the preference value back to ' its original value. Dim ACADPref As AcadPreferencesOutput Dim originalValue As Integer ' Get the user preferences object Set ACADPref = ThisDrawing.Application.Preferences.Output ' Read and display the original value originalValue = ACADPref.PrinterSpoolAlert MsgBox "The PrinterSpoolAlert preference is set to: " & originalValue ' Modify the PrinterSpoolAlert preference by toggling the value ACADPref.PrinterSpoolAlert = acPrinterNeverAlert MsgBox "The PrinterSpoolAlert preference has been set to: " & ACADPref.PrinterSpoolAlert ' Reset the preference back to its original value ACADPref.PrinterSpoolAlert = originalValue MsgBox "The PrinterSpoolAlert preference was reset back to: " & originalValue End Sub 可视化 LISP: (vl-load-com) (defun c:Example_PrinterSpoolAlert() ;; This example reads and modifies the PrinterSpoolAlert ;; 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-PrinterSpoolAlert (vla-get-Output preferences))) (alert (strcat "The PrinterSpoolAlert preference is set to: " (itoa originalValue))) ;; Modify the PrinterSpoolAlert preference by toggling the value (vla-put-PrinterSpoolAlert (vla-get-Output preferences) acPrinterNeverAlert) (alert (strcat "The PrinterSpoolAlert preference has been set to: " (itoa (vla-get-PrinterSpoolAlert (vla-get-Output preferences))))) ;; Reset the preference back to its original value (vla-put-PrinterSpoolAlert (vla-get-Output preferences) originalValue) (alert (strcat "The PrinterSpoolAlert preference was reset back to: " (itoa (vla-get-PrinterSpoolAlert (vla-get-Output preferences))))) ) |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2024-12-15 11:41
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.