When I run the B3 event I encounter the exception. If I remove the Using statement it will run through the listbox items printing them to the screen. As far as I can tell all of the necassary refernces have been added acmgd.dll, acdbmg.dll, 2010 18.0 type lib., and I have included these Imports..
Imports ADOX
Imports Autodesk
Imports Autodesk.AutoCAD
Imports Autodesk.AutoCAD.ApplicationServices
Imports Autodesk.AutoCAD.DatabaseServices
Imports Autodesk.AutoCAD.Interop
Imports Autodesk.AutoCAD.Interop.Common
Imports System
Imports System.Collections.Generic
Imports System.Data.OleDb
Imports System.Diagnostics
Imports System.Diagnostics.Stopwatch
Imports System.IO
Imports System.MarshalByRefObject
Imports System.Runtime.InteropServices
Imports System.String
Imports System.Text
Imports System.Threading
Imports System.Windows.Forms
Imports System.Windows.Forms.Application
Private Sub B3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B3.Click
Dim i As Integer
stopWatch.Start()
Timer1.Enabled = True
For i = 0 To ListBox1.Items.Count - 1
ListBox1.TopIndex = i
ListBox1.SetSelected(i, True)
'Debug.Print(MyAppPath & "\" & ListBox1.Items(i).ToString)
DoEvents()
Using acDb As Database = New Database(False, True)
acDb.ReadDwgFile(MyAppPath & "\" & ListBox1.Items(i).ToString, System.IO.FileShare.Read, False, "")
End Using
ListBox1.SetSelected(i, False)
DoEvents()
Next i
Timer1.Enabled = False
stopWatch.Stop()
End Sub
Throws this exception..
An unhandled exception of type 'System.IO.FileNotFoundException' occurred in System.Windows.Forms.dll
Additional information: The specified module could not be found. (Exception from HRESULT: 0x8007007E)
I have been searching the Groups with little success, I have a VB6 app. that I am working on getting into .NET and this is the basic step to cycle through each file and extract the data stored within the EED out to an Access database.
Thanks