- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I've never had a problem using the VL.Application.16 from AutoCAD 2004 thru 2014. Now in AutoCAD 2015, it crashes without any kind of message.
To reproduce the error, cut and paste this code to a VBA module:
Option Explicit Public Sub vlTest() Dim vlApp As Object Debug.Print "vlApp object declared" ''## Either way causes autocad to become unstable Set vlApp = CreateObject("VL.Application.16") 'Set vlApp = Application.GetInterfaceObject("VL.Application.16") Debug.Print "vlApp object assigned" Dim vlDoc As Object Debug.Print "vlDoc object declared" ''## The crash occurs here when run using LISP vl-rbarun Set vlDoc = vlApp.ActiveDocument Debug.Print "vlDoc object assigned" End Sub
Test 1: in the immediate window in the VBA IDE, run the macro. Should run an print 4 lines.
Test 2: run from autocad command line using VBARUN and select the macro. Again, prints 4 lines.
Test 3: Cut and paste (or type) the following to the command line in AutoCAD:
(vl-rbarun "vlTest")
AutoCAD 2015 crashes trying to get the active VL document. Even when debugging within the IDE, it crashes just trying to assign vlApp to a watch window when run from vl-vbarun.
Any insight would be greatly appreciated. Thanks in advance.
Lanny
[AutoCAD 2015 sp2]
[64-bit Windows 8.1 Enterprise 64-bit (6.2, Build 9200) (9600.winblue_r5.141029-1500)]
Solved! Go to Solution.