Cannot Get or Create AutoCAD App

Cannot Get or Create AutoCAD App

meck
Collaborator Collaborator
888 Views
8 Replies
Message 1 of 9

Cannot Get or Create AutoCAD App

meck
Collaborator
Collaborator

I have upgraded to AutoCAD 2015 and now I cannot get the app anymore. I'm getting the "Cannot Connect to ActiveX component" error. I assume it has something to do with versioning and I tried using AutoCAD.Application.19 but that doesn't work either. Is this the problem? If so how do I get the version? I looked in the Help/About but couldn't find anything.

Any help would be greatly appreciated!

 

I'm using VB.net 2010.

 

Below is my connection code...

 

 

Try
      oAcadApp = GetObject(, "AutoCAD.Application")
Catch
     Try
          oAcadApp = CreateObject("AutoCAD.Application")
          oAcadApp.Visible = True
     Catch ex As Exception
          MsgBox(ex.Message & " error while starting AutoCAD.", MsgBoxStyle.Exclamation, "Error Starting AutoCAD!")
          Exit Sub
     End Try
End Try

Mike Eck
Master Drafter/ CAD Programmer
Using Inventor 2018
0 Likes
Accepted solutions (1)
889 Views
8 Replies
Replies (8)
Message 2 of 9

Ed__Jobe
Mentor
Mentor

Are  you creating a standalone exe? Is it 32bit and your acad 2015 is 64bit?

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes
Message 3 of 9

meck
Collaborator
Collaborator

Yes it is a stand alone exe.

AutoCAD is 64 bit.

All running on Windows 7.

Mike Eck
Master Drafter/ CAD Programmer
Using Inventor 2018
0 Likes
Message 4 of 9

Ed__Jobe
Mentor
Mentor
Accepted solution
On your project properties, build tab, what is the platform target set to? Can you set it to x64?

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes
Message 5 of 9

meck
Collaborator
Collaborator

No it will not let me set it to x64 only x86

Mike Eck
Master Drafter/ CAD Programmer
Using Inventor 2018
0 Likes
Message 6 of 9

Ed__Jobe
Mentor
Mentor
Not sure why you can't change it. Maybe its because you have references to 32 bit apps?

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

Message 7 of 9

meck
Collaborator
Collaborator

I figured it out and was able to get it to change to X64, but now I have errors everywhere. All of these to start with...

Imports Autodesk.Connectivity.WebServices

Imports Autodesk.Connectivity.WebServicesTools

Imports Autodesk.Connectivity.Explorer.ExtensibilityTools

Mike Eck
Master Drafter/ CAD Programmer
Using Inventor 2018
0 Likes
Message 8 of 9

meck
Collaborator
Collaborator

I got it to work!

I had to bump the framework up to 4.5 and then everything came back into focus.

I would never have been able to do this without your help!

Much appreciated!

Mike Eck
Master Drafter/ CAD Programmer
Using Inventor 2018
0 Likes
Message 9 of 9

Ed__Jobe
Mentor
Mentor
Glad you got it to work.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes