指定用于后台打印的应用程序。 支持的平台:仅窗口 属性值只读:不 类型:字符串 后台打印应用程序。 言论此属性包含要与自动后台打印一起使用的打印后台打印可执行文件的驱动器、路径和应用程序名称。 例子工 务 局: Sub Example_PrintSpoolExecutable() ' This example returns the current setting of ' PrintSpoolExecutable. It then changes the value, and finally ' it resets the value back to the original setting. Dim preferences As AcadPreferences Dim currPrintSpoolExecutable As String Dim newPrintSpoolExecutable As String Set preferences = ThisDrawing.Application.Preferences ' Retrieve the current PrintSpoolExecutable value currPrintSpoolExecutable = preferences.Files.PrintSpoolExecutable MsgBox "The current value for PrintSpoolExecutable is " & currPrintSpoolExecutable, vbInformation, "PrintSpoolExecutable Example" ' Change the value for PrintSpoolExecutable newPrintSpoolExecutable = "TestPrintSpoolExecutable" preferences.Files.PrintSpoolExecutable = newPrintSpoolExecutable MsgBox "The new value for PrintSpoolExecutable is " & newPrintSpoolExecutable, vbInformation, "PrintSpoolExecutable Example" ' Reset PrintSpoolExecutable to its original value preferences.Files.PrintSpoolExecutable = currPrintSpoolExecutable MsgBox "The PrintSpoolExecutable value is reset to " & currPrintSpoolExecutable, vbInformation, "PrintSpoolExecutable Example" End Sub Visual LISP: (vl-load-com) (defun c:Example_PrintSpoolExecutable() ;; This example returns the current setting of ;; PrintSpoolExecutable. It then changes the value, and finally ;; it resets the value back to the original setting. (setq acadObj (vlax-get-acad-object)) (setq preferences (vla-get-Preferences acadObj)) ;; Retrieve the current PrintSpoolExecutable value (setq currPrintSpoolExecutable (vla-get-PrintSpoolExecutable (vla-get-Files preferences))) (alert (strcat "The current value for PrintSpoolExecutable is " currPrintSpoolExecutable)) ;; Change the value for PrintSpoolExecutable (setq newPrintSpoolExecutable "TestPrintSpoolExecutable") (vla-put-PrintSpoolExecutable (vla-get-Files preferences) newPrintSpoolExecutable) (alert (strcat "The new value for PrintSpoolExecutable is " newPrintSpoolExecutable)) ;; Reset PrintSpoolExecutable to its original value (vla-put-PrintSpoolExecutable (vla-get-Files preferences) currPrintSpoolExecutable) (alert (strcat "The PrintSpoolExecutable value is reset to " currPrintSpoolExecutable)) ) |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-1-8 19:22
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.