Imports System
Imports System.IO
Imports System.Security.Principal
Imports Autodesk.AutoCAD.ApplicationServices
Imports Autodesk.AutoCAD.DatabaseServices
Imports Autodesk.AutoCAD.EditorInput
Imports Autodesk.AutoCAD.Geometry
Imports Autodesk.AutoCAD.Runtime
Namespace Foo
Public Class FooCommands
<CommandMethod("FINDVBA")> _
Public Sub FINDVBA()
Dim acDoc As Document = Application.DocumentManager.MdiActiveDocument
Dim ed As Editor = acDoc.Editor
Dim oDb As Database = acDoc.Database
Dim filePath As String
Try
filePath = HostApplicationServices.Current.FindFile("AcVBA.arx", oDb, FindFileHint.Default)
If filePath <> Nothing Then
ed.WriteMessage(vbLf & filePath & vbLf)
Else
ed.WriteMessage(vbLf & "** AcVBA.arx not found ** " & vbLf)
End If
Catch ex As Exception
ed.WriteMessage(vbLf & "** An exception has occurred ** " & vbLf)
End Try
End Sub
End Class
End Namespace