Message 1 of 9
AutoCAD 2016 GetAcadDocument throws exception

Not applicable
03-01-2016
01:21 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
The following code is used without any problems in AutoCAD 2015 but gives now an exception error on the GetAcadDocument function:
Public ReadOnly Property ThisDrawing As AcadDocument
Get
Dim tAcadDoc As ApplicationServices.Document
Dim tAcadDocCOM As AcadDocument
tAcadDoc = ApplicationServices.Application.DocumentManager.MdiActiveDocument
tAcadDocCOM = CType(ApplicationServices.DocumentExtension.GetAcadDocument(tAcadDoc), AcadDocument)
Return tAcadDocCOM
End Get
End Property
I'm using the ObjectARX2015 library and .NetFramework v4.5
TIA for your help.
Regards Leo