.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

AutoCAD 2015 and VB.NET

3 REPLIES 3
Reply
Message 1 of 4
leeraybone
1201 Views, 3 Replies

AutoCAD 2015 and VB.NET

Having issues with the following line of code:

Dim ThisDrawing As AcadDocument = DocumentExtension.GetAcadDocument(Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument)

 

I have narrowed down the error to the following process:

DocumentExtension.GetAcadDocument()

 

Can anyone please advise on if they are having the same issues? and how they are getting around it?

 

I am using Visual Studio 2010, with 2013 dll's (accoremgd, acdbmgd, acmgd, Autodesk.AutoCAD.Interop, and Autodesk.AutoCAD.Interop.Commom)

with a target framework of .NET 4

 

Any help would be greatly appreciated.

 

Regards

 

Lee

 

 

3 REPLIES 3
Message 2 of 4
_gile
in reply to: leeraybone

Hi,

 

As you're using COM*, I'm afraid you'd have to build a new assembly targeting AutoCAD 2015 libraries and Framework 4.5 which requires Visual Studio 2012.

Another way should be using late binding which avoid referencing the COM libraries.

 

* most plain .NET applications keep on working on A2015 without any change or need to to recompile.



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

Message 3 of 4
leeraybone
in reply to: _gile

how do you mean COM?

Message 4 of 4
_gile
in reply to: leeraybone

I mean the AutoCAD COM interop API referenced by Autodesk.AutoCAD.Interop, and Autodesk.AutoCAD.Interop.Common.

The COM interface is version dependent

 

You can read this:

http://help.autodesk.com/view/ACD/2015/ENU/?guid=GUID-BFFF308E-CC10-4C56-A81E-C15FB300EB70



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost