This is on my laptop (which is my main computer). I'm an engiineer (structural) but I do all the development for my company.
I'm the admin and have full access rights. AutoCad actually starts (I can see it in Task Manager), but I get the error.
The office IT dude installed AutoCAD 2012 not me. I'll have to get the DVD from them (I'm a remote employee).
I checked the ACad.exe.config and it has the line you warned about "supportedRuntime version="v4.0".
I do have the AutoCAD 2010 DVD. Since our side of the firm only uses AutoCAD as a utility (we are the 3D group), would it be worth my time to uninstall 2012, install 2010 and try to start a 2010 instance?
Uninstalled 2012, installed 2010 and the simple connect works. I'll get back to the original code now.
Thanks Norman as it seems my issue was AutoCAD 2012 (Installation/References) related.
Okay everything is working after some remaining "on error ..." with "try ... " syntax. The code seems sluggish which I belive other posts have commented on several possible causes (using VBA like syntax thru COM).
One thing I noticed. When I first installed AutoCAD 2010 and went into the VS 2010 project, after adding the AutoCAD/ObjectDBX Common reference (under the COM tab), the Path would show up as unknown (unable to be found). So I pointed to the file thru Browse but the code would error out when I first tried to use the Common namespace. So I unstalled and reinstalled AutoCAD 2010. Now the AutoCAD/ObjectDBX Common does not show up at all under the Com tab. But when I point to the file thru browse, all works. Weird and troubling.
I haven't installed any of the 2010 patches yet. I'll wait till I get the code polished and finished.
H'm, I'm beginning to think that the phrase "Managed API" should be "Mangled API". After I installed AutoCAD 2010 SP2, couldn't connect to AutoCAD again. So I uninstalled the patch and everything works but it is a slow as molasses. Of course the AutoCAD/ObjectDBX Common is still missing under the COM tab. I think I'll go play some WOW and think about it.
In any event, thanks to all who helped. I'll start back next week on looking at speeding things up.
Happy New Year Peeps!
Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.