https://forums.autodesk.com/t5/net/d ... cedgetenv/td-p/5009282Get AutoCAD SupportPath
Imports Autodesk.AutoCAD.Runtime
Imports Autodesk.AutoCAD.EditorInput
Imports Autodesk.AutoCAD.ApplicationServices
Public Class CommandMethods
<CommandMethod("Test")>
Public Sub Test()
Dim ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor
Dim prefs As Dynamic = Application.Preferences
Dim supportPaths As String() = prefs.Files.SupportPath.Split(";"c)
For Each str As String In supportPaths
ed.WriteMessage(vbLf & "{0}", str)
Next
End Sub
End Class
Imports Autodesk.AutoCAD.Runtime
Imports Autodesk.AutoCAD.Interop
Imports Autodesk.AutoCAD.EditorInput
Imports Autodesk.AutoCAD.ApplicationServices
Public Class CommandMethods
<CommandMethod("Test")> _
Public Sub Test()
Dim ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor
Dim prefs As AcadPreferences = CType(Application.Preferences, AcadPreferences)
Dim supportPaths As String() = prefs.Files.SupportPath.Split(";"C)
For Each str As String In supportPaths
ed.WriteMessage(vbLf & "{0}", str)
Next
End Sub
End Class
[本日志由 tiancao1001 于 2023-08-01 03:12 PM 编辑]
暂时没有评论