errors while build and run old vs c# project while referencing autocad 2019

errors while build and run old vs c# project while referencing autocad 2019

Anonymous
Not applicable
470 Views
6 Replies
Message 1 of 7

errors while build and run old vs c# project while referencing autocad 2019

Anonymous
Not applicable

Hello,

I am trying to fix a bug in old 2003 vs project created a long time ago in my company. The project references an old autocan version (not sure which version. If it is important I will find it  in one of the following days when someone will be in he office).

At my computer at home I have Visual Studio Community 2017 and I installed an autocad 2019 to test if I can build the old vs project.

I get  about 100 errors of un-recognized type or namespace such as Interop, AcadApplication, AcadDocument, AcadEntity, etc...

I do see that some autocad includes succeed, for example:

using Autodesk.AutoCAD.Runtime;

using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.EditorInput;

using Autodesk.AutoCAD.Geometry;

 

I tried to find a solution in google and in the forums here and in VS.

I understood that it is probably related to adding references to the project, so I entered the COM part of the Reference Manager and added all the autocad 2019 Type Library, all the autocad Map MPolygon Type Library and all autocad/ObjectDBX Common 23.0 Type Library.

 

It didn't help either.

Help will be very appriciated.

0 Likes
471 Views
6 Replies
Replies (6)
Message 2 of 7

h_s_walker
Mentor
Mentor

LT cannot run VBA projects.

Howard Walker
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.

EESignature


Left Handed and Proud

0 Likes
Message 3 of 7

Anonymous
Not applicable

If LT can't be used, is there a different version that I can try to istall and connect to?

0 Likes
Message 4 of 7

h_s_walker
Mentor
Mentor

Full AutoCAD. You should be able to download a 30 day trial of 2019 to have a see if the program will work

Howard Walker
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.

EESignature


Left Handed and Proud

0 Likes
Message 5 of 7

Anonymous
Not applicable

Thank you.

 

I have uninstalled th LT version and downloaded and installed the full version.

I found the extra reference: AutoCAD Focus Control for VBA Type Library and added it, but all the references are still not recognized.

0 Likes
Message 6 of 7

pendean
Community Legend
Community Legend
The VBA Customization forum is over here, its time to move your questions/queries my friend https://forums.autodesk.com/t5/visual-basic-customization/bd-p/33

0 Likes
Message 7 of 7

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

not sure why anyone here writes about VBA?

 

>> I get about 100 errors of un-recognized type or namespace

That sounds like

  • you need to set your project to Framework 4.7
  • you need to add a reference accoremdg which was not needed/not available before AutoCAD 2013

 

HTH, - alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes