HelpFilePath 属性 (ActiveX) 
指定 AutoCAD 帮助文件的位置。 支持的平台:仅限 Windows 属性值只读:不 类型:字符串 AutoCAD 帮助文件的位置。 言论此特性指定 AutoCAD 帮助文件的驱动器、路径和文件名。 例子VBA: Sub Example_HelpFilePath()
    ' This example returns the current setting of
    ' HelpFilePath. It then changes the value, and finally
    ' it resets the value back to the original setting.
    
    Dim preferences As AcadPreferences
    Dim currHelpFilePath As String
    Dim newHelpFilePath As String
    Set preferences = ThisDrawing.Application.preferences
    
    ' Retrieve the current HelpFilePath value
    currHelpFilePath = preferences.Files.HelpFilePath
    MsgBox "The current value for HelpFilePath is " & currHelpFilePath, vbInformation, "HelpFilePath Example"
    
    ' Change the value for HelpFilePath
    newHelpFilePath = "C:/AutoCAD/Help"
    preferences.Files.HelpFilePath = newHelpFilePath
    MsgBox "The new value for HelpFilePath is " & newHelpFilePath, vbInformation, "HelpFilePath Example"
    
    ' Reset HelpFilePath to its original value
    preferences.Files.HelpFilePath = currHelpFilePath
    MsgBox "The HelpFilePath value is reset to " & currHelpFilePath, vbInformation, "HelpFilePath Example"
End Sub
可视化 LISP: (vl-load-com)
(defun c:Example_HelpFilePath()
    ;; This example returns the current setting of
    ;; HelpFilePath. 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 HelpFilePath value
    (setq currHelpFilePath (vla-get-HelpFilePath (vla-get-Files preferences)))
    (alert (strcat "The current value for HelpFilePath is " currHelpFilePath))
    
    ;; Change the value for HelpFilePath
    (setq newHelpFilePath "C:/AutoCAD/Help")
    (vla-put-HelpFilePath (vla-get-Files preferences) newHelpFilePath)
    (alert (strcat "The new value for HelpFilePath is " newHelpFilePath))
    
    ;; Reset HelpFilePath to its original value
    (vla-put-HelpFilePath (vla-get-Files preferences) currHelpFilePath)
    (alert (strcat "The HelpFilePath value is reset to " currHelpFilePath))
)
 | 
|Archiver|CAD开发者社区
( 苏ICP备2022047690号-1   苏公网安备32011402011833)
GMT+8, 2025-11-4 14:30
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.