We have and old VB6 application that I tried to convert to .net but it had a ton of errors so I want to wait if I can. In 2005 it works fine. But we recently just upgraded to 2012. I cannot get it to find my running acad 2012. I use this currently.
Set acApp = GetObject(, "AutoCAD.Application")
Should this work in 2012 or will I need to change it?
>> Set acApp = GetObject(, "AutoCAD.Application")
>> Should this work in 2012 or will I need to change it?
Yes, in principle it should work.
First please look into your VB-project-references and verify that you have changed the AutoCAD-specific references from 2005 to 2012 (to 18.2). If that is the problem, that could be changed within seconds.
But what could be much more problem, would be differences between 32bit and 64bit, are you running now 64bit-AutoCAD? If so, you have no chance (imho) to get it running, because your EXE also has to be 64bit and with VB6 you cannot compile to 64bit. In that case your next step would be to upgrade your code from VB6 to VB.NET.
HTH, - alfred -
There shouldn't be a problem automating a 64-bit executable from a 32-bit executable (and vice versa). That's only a problem if your COM server is a DLL you're loading into your executable's process space. But the AutoCAD 32- and 64- bit Type Libraries are different, and so you do need to reference the correct one, depending on which AutoCAD you're automating.
doc_x ==> are you skelow (thread opener)? Or is this a new issue?
So show your code you have (at least the snippet where the problem occurs and give us as info the line and the message of the error.
- alfred -
>> So Sorry!
nothing to worry about, at least I did not mean anything that should have to be appologized.
It's just to make it clear for us as the thread had paused for 5 months now.
- alfred -
Hi Alfred !
I understand that the old vb6 application does not work in AutoCAD 2012. But building an activex (. Dll) in vb6, it works perfectly in versions 2011 and 2012, once it is in 32bit. In 64-bit will also work, however, performance falls a bit. In the 2010 version works fine.
I hope I have clarified,
Start with some of our most frequented solutions to get help installing your software.