指定在 AutoCAD 无法找到原始字体且字体映射文件中未指定备用字体时要使用的字体文件的位置。 支持的平台:仅窗口 属性值只读:不 类型:字符串 备用字体文件。 言论没有额外的评论。 例子工 务 局: Sub Example_AltFontFile() ' This example returns the current setting of ' AltFontFile. It then changes the value, and finally ' it resets the value back to the original setting. Dim preferences As AcadPreferences Dim currAltFontFile As String Dim newAltFontFile As String Set preferences = ThisDrawing.Application.preferences ' Retrieve the current AltFontFile value currAltFontFile = preferences.Files.AltFontFile MsgBox "The current value for AltFontFile is " & currAltFontFile, vbInformation, "AltFontFile Example" ' Change the value for AltFontFile newAltFontFile = "C:/AutoCAD/Fonts/gothice.shx" preferences.Files.AltFontFile = newAltFontFile MsgBox "The new value for AltFontFile is " & newAltFontFile, vbInformation, "AltFontFile Example" ' Reset AltFontFile to its original value preferences.Files.AltFontFile = currAltFontFile MsgBox "The AltFontFile value is reset to " & currAltFontFile, vbInformation, "AltFontFile Example" End Sub Visual LISP: (vl-load-com) (defun c:Example_AltFontFile() ;; This example returns the current setting of ;; AltFontFile. 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)) (setq files (vla-get-Files preferences)) ;; Retrieve the current AltFontFile value (setq currAltFontFile (vla-get-AltFontFile files)) (alert (strcat "The current value for AltFontFile is " currAltFontFile)) ;; Change the value for AltFontFile (setq newAltFontFile "C:/AutoCAD/Fonts/gothice.shx") (vla-put-AltFontFile files newAltFontFile) (alert (strcat "The new value for AltFontFile is " newAltFontFile)) ;; Reset AltFontFile to its original value (vla-put-AltFontFile files currAltFontFile) (alert (strcat "The AltFontFile value is reset to " currAltFontFile)) ) |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-1-8 19:23
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.