SupportPath 属性 (ActiveX) 
指定 AutoCAD 搜索支持文件的目录。 支持的平台:仅限 Windows 属性值只读:不 类型:字符串 支持文件所在的目录。指定支持、字体、帮助和奖励文件的驱动器号和路径。 言论使用分号 (;) 分隔多个目录;但是,不要以分号结束字符串。 例子VBA: Sub Example_SupportPath()
    ' This example returns the current setting of
    ' SupportPath. It then changes the value, and finally
    ' it resets the value back to the original setting.
    
    Dim preferences As AcadPreferences
    Dim currSupportPath As String
    Dim newSupportPath As String
    
    Set preferences = ThisDrawing.Application.preferences
    
    ' Retrieve the current SupportPath value
    currSupportPath = preferences.Files.SupportPath
    MsgBox "The current value for SupportPath is " & currSupportPath, vbInformation, "SupportPath Example"
    
    ' Change the value for SupportPath
    newSupportPath = "TestSupportPath"
    preferences.Files.SupportPath = newSupportPath
    MsgBox "The new value for SupportPath is " & newSupportPath, vbInformation, "SupportPath Example"
    
    ' Reset SupportPath to its original value
    preferences.Files.SupportPath = currSupportPath
    MsgBox "The SupportPath value is reset to " & currSupportPath, vbInformation, "SupportPath Example"
End Sub
可视化 LISP: (vl-load-com)
(defun c:Example_SupportPath()
    ;; This example returns the current setting of
    ;; SupportPath. 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 SupportPath value
    (setq currSupportPath (vla-get-SupportPath (vla-get-Files preferences)))
    (alert (strcat "The current value for SupportPath is " currSupportPath))
    
    ;; Change the value for SupportPath
    (setq newSupportPath "TestSupportPath")
    (vla-put-SupportPath (vla-get-Files preferences) newSupportPath)
    (alert (strcat "The new value for SupportPath is " newSupportPath))
    
    ;; Reset SupportPath to its original value
    (vla-put-SupportPath (vla-get-Files preferences) currSupportPath)
    (alert (strcat "The SupportPath value is reset to " currSupportPath))
)
 | 
|Archiver|CAD开发者社区
( 苏ICP备2022047690号-1   苏公网安备32011402011833)
GMT+8, 2025-11-4 14:08
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.