指定 AutoCAD 帮助文件的位置。 支持的平台:仅窗口 属性值只读:不 类型:字符串 AutoCAD 帮助文件的位置。 言论此属性指定 AutoCAD 帮助文件的驱动器、路径和文件名。 例子工 务 局: 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
Visual 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-10-24 12:37
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.