2015 Crashes from VBA when callling vlisp function vl-vbarun with VL.app.16

2015 Crashes from VBA when callling vlisp function vl-vbarun with VL.app.16

lando7189
Advocate Advocate
961 Views
5 Replies
Message 1 of 6

2015 Crashes from VBA when callling vlisp function vl-vbarun with VL.app.16

lando7189
Advocate
Advocate

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)]

0 Likes
Accepted solutions (2)
962 Views
5 Replies
Replies (5)
Message 2 of 6

lando7189
Advocate
Advocate

The above lisp function that crashes should be entered as:

 

(vl-vbarun "vlTest")

... then it will crash. Sorry for the typo.  - Lanny

0 Likes
Message 3 of 6

lando7189
Advocate
Advocate
Accepted solution

Issue is fixed in AutoCAD 2016.

 

Smiley Very Happy

0 Likes
Message 4 of 6

AdrianSaf
Enthusiast
Enthusiast

Anything new on this for AutoCAD 2015? Any service patch or other fix?

0 Likes
Message 5 of 6

Alfred.NESWADBA
Consultant
Consultant
Accepted solution

Hi,

 

maybe that helps:

http://knowledge.autodesk.com/support/autocad/downloads/caas/downloads/content/autodesk-C2-AE-autoca...

 

- alfred -

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

(not an Autodesk consultant)
Message 6 of 6

AdrianSaf
Enthusiast
Enthusiast

Yes, that fixes the issue. Thank you.

0 Likes