I am using Windows7 Home Premium. ie 64bit.
The following is what I believe is standard code. I have simplified it, and it has worked in the recent past. Now App returns nothing if AutoCad is loaded. And fails on GetObject with can't create ActiveX etc
Code:
Imports Autodesk.AutoCAD.Interop
Public Class AcadClass
Private App As AcadApplication
Private AppReg As String
Public Sub New(ByVal ver As String) ' ver is read from Windows Registry
If ver.StartsWith("R") Then ver = ver.Substring(1)
AppReg = "Autocad.Application." & ver
Try
App = GetObject(, AppReg)
Catch ex As Exception
Try
App = CreateObject(AppReg)
Catch ex1 As Exception
Threading.Thread.Sleep(1000)
App = GetObject(, AppReg)
End Try
End Try
End Sub
End Class
The second try is intended to give AutoCad a chance to load and register itself.
It is galling because it used to work. And now I am worried that their is going to be a problem on other machines.