指定用于临时打印文件名的备用名称。 支持的平台:仅窗口 属性值只读:不 类型:字符串 打印文件的备用名称。输入“.”以使用默认值(当前图形名称)。输入备用打印文件的驱动器、路径和文件名。 言论默认名称是图形的名称加上文件扩展名 .plt。 例子工 务 局: Sub Example_PrintFile() ' This example returns the current setting of ' PrintFile. It then changes the value, and finally ' it resets the value back to the original setting. Dim preferences As AcadPreferences Dim currPrintFile As String Dim newPrintFile As String Set preferences = ThisDrawing.Application.Preferences ' Retrieve the current PrintFile value currPrintFile = preferences.Files.PrintFile MsgBox "The current value for PrintFile is " & currPrintFile, vbInformation, "PrintFile Example" ' Change the value for PrintFile newPrintFile = "TestPrintFile.plt" preferences.Files.PrintFile = newPrintFile MsgBox "The new value for PrintFile is " & newPrintFile, vbInformation, "PrintFile Example" ' Reset PrintFile to its original value preferences.Files.PrintFile = currPrintFile MsgBox "The PrintFile value is reset to " & currPrintFile, vbInformation, "PrintFile Example" End Sub Visual LISP: (vl-load-com) (defun c:Example_PrintFile() ;; This example returns the current setting of ;; PrintFile. 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 PrintFile value (setq currPrintFile (vla-get-PrintFile (vla-get-Files preferences))) (alert (strcat "The current value for PrintFile is " currPrintFile)) ;; Change the value for PrintFile (setq newValue "TestPrintFile.plt") (vla-put-PrintFile (vla-get-Files preferences) newValue) (alert (strcat "The new value for PrintFile is " newValue)) ;; Reset PrintFile to its original value (vla-put-PrintFile (vla-get-Files preferences) currPrintFile) (alert (strcat "The PrintFile value is reset to " currPrintFile)) ) |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-1-8 19:45
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.