Message 1 of 5
AutoCAD close error..... (A challenge)

Not applicable
05-01-2002
02:14 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a vba sub, lets say...
Public Sub MyStuff()
call VLstuff ' where VL is some Vlisp I'm calling in VBA using the
ThisDrawing.Application.GetInterfaceObject("VL.Application.1")
if then
do some stuff
end if
end sub
If I run this function either through a form I load with a (vl-vbarun
"MyForm") or from the command line -vbarun MyStuff, AutoCAD is happy....
However:
If I have a (defun c:MyCommand()(vl-vbarun "MyStuff")) AutoCAD will throw up
a Runtime Visual C++ Error: application abnormally terminated.
The function runs just fine. AutoCAD doesn't look like it has any problems.
Just after you close the drawing and then exit AutoCAD it throws up this
error......... I susspect the problem is with the Vlisp activex, but no clue
on how to work around it - other than not making a MyCommand and just using
toolbars..... And why running it from a form causes no error, who knows?
Public Sub MyStuff()
call VLstuff ' where VL is some Vlisp I'm calling in VBA using the
ThisDrawing.Application.GetInterfaceObject("VL.Application.1")
if then
do some stuff
end if
end sub
If I run this function either through a form I load with a (vl-vbarun
"MyForm") or from the command line -vbarun MyStuff, AutoCAD is happy....
However:
If I have a (defun c:MyCommand()(vl-vbarun "MyStuff")) AutoCAD will throw up
a Runtime Visual C++ Error: application abnormally terminated.
The function runs just fine. AutoCAD doesn't look like it has any problems.
Just after you close the drawing and then exit AutoCAD it throws up this
error......... I susspect the problem is with the Vlisp activex, but no clue
on how to work around it - other than not making a MyCommand and just using
toolbars..... And why running it from a form causes no error, who knows?