I am converting my programs from 2012 to 2014. I am using VB.Net 2010. I ran into this problem with this code. I received the error: 'AcadDocument' is not a member of 'Autodesk.AutoCAD.ApplicationServices.Document'.
I put Core after ApplicationServices but that did not fix it. Any clues?
Imports System Imports Autodesk.AutoCAD
Imports Autodesk.AutoCAD.Runtime
Imports Autodesk.AutoCAD.ApplicationServices
Imports Autodesk.AutoCAD.DatabaseServices
Imports Autodesk.AutoCAD.Interop
Imports Autodesk.AutoCAD.Interop.Common
Public Class myCustomProperties
Public ReadOnly Property ThisDrawing() As AcadDocument
Get
Return Autodesk.AutoCAD. _
ApplicationServices.Application. _
DocumentManager.MdiActiveDocument.AcadDocument
End Get
End Property
End Class
Solved! Go to Solution.
Solved by _gile. Go to Solution.
Hi,
Since A 2013, the Document.AcadDocument property have been replaced by the GetAcadDocument() extension method deined in the DocumentExtension module which needs to be imported.
Imports System Imports Autodesk.AutoCAD Imports Autodesk.AutoCAD.Runtime Imports Autodesk.AutoCAD.ApplicationServices Imports Autodesk.AutoCAD.DatabaseServices Imports Autodesk.AutoCAD.Interop Imports Autodesk.AutoCAD.Interop.Common Imports Autodesk.AutoCAD.ApplicationServices.DocumentExtension Public Class myCustomProperties Public ReadOnly Property ThisDrawing() As AcadDocument Get Return Application.DocumentManager.MdiActiveDocument.GetAcadDocument() End Get End Property End Class