指定临时文件的扩展名。 支持的平台:仅窗口 属性值只读:不 类型:字符串 此字符串必须介于 1 到 3 个字符之间(包括 1 到 3 个字符)。 言论此属性的默认值为ac$。 临时文件扩展名是用于临时文件的一到三个字符扩展名。在多用户环境中,您可以通过为每个用户指定不同的名称来避免混淆。 例子工 务 局: Sub Example_TempFileExtension() ' This example returns the current setting of ' TempFileExtension. It then changes the value, and finally ' it resets the value back to the original setting. Dim preferences As AcadPreferences Dim currTempFileExtension As String Set preferences = ThisDrawing.Application.preferences ' Retrieve the current TempFileExtension value currTempFileExtension = preferences.OpenSave.TempFileExtension MsgBox "The current value for TempFileExtension is " & preferences.OpenSave.TempFileExtension, vbInformation, "TempFileExtension Example" ' Change the value for TempFileExtension preferences.OpenSave.TempFileExtension = "@@@" MsgBox "The new value for TempFileExtension is " & preferences.OpenSave.TempFileExtension, vbInformation, "TempFileExtension Example" ' Reset TempFileExtension to its original value preferences.OpenSave.TempFileExtension = currTempFileExtension MsgBox "The TempFileExtension value is reset to " & preferences.OpenSave.TempFileExtension, vbInformation, "TempFileExtension Example" End Sub Visual LISP: (vl-load-com) (defun c:Example_TempFileExtension() ;; This example returns the current setting of ;; TempFileExtension. 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 TempFileExtension value (setq currTempFileExtension (vla-get-TempFileExtension (vla-get-OpenSave preferences))) (alert (strcat "The current value for TempFileExtension is " currTempFileExtension)) ;; Change the value for TempFileExtension (vla-put-TempFileExtension (vla-get-OpenSave preferences) "@@@") (alert (strcat "The new value for TempFileExtension is " (vla-get-TempFileExtension (vla-get-OpenSave preferences)))) ;; Reset TempFileExtension to its original value (vla-put-TempFileExtension (vla-get-OpenSave preferences) currTempFileExtension) (alert (strcat "The TempFileExtension value is reset to " (vla-get-TempFileExtension (vla-get-OpenSave preferences)))) ) |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-1-8 19:44
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.