Message 1 of 6
ENTMAKE crashes Autocad after call to VBA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have Fatal error on newer versions of Autocad
Lisp function is calling VBA and then entmake crashes Autocad
The first lisp is calling VBA MsgBox. You will need to save dvb vile at c:\Temp\msgbox.dvb
The second(NewLine) is crashing on entmake
(defun MsgBox ( StringParam / retList ret )
(setq retList '("None" "OK" "CANCEL" "ABORT" "RETRY" "IGNORE" "YES" "NO"))
(vl-vbaload C:\\Temp\\msbbox.dvb"))
(setq ret(atoi(getstring(command "-VBARUN" "vbMsgBox" StringParam))))
(nth ret retList)
)
(defun NewLine()
(msgbox "Create a New Line, 64, Title")
(entmake (list'(0 . "LINE")(cons 10 (getpoint))(cons 11 (getpoint))))
)
This is a VBA code. Create a new VBA project and save it at c:\Temp\msgbox.dvb
Sub vbMsgBox()
Dim arrParam, ret
Param1 = ThisDrawing.Utility.GetString(False)
arrParam = Split(Param1, ",")
ret = MsgBox(arrParam(0), CInt(arrParam(1)), arrParam(2))
ThisDrawing.SendCommand ret & vbCr
End Sub
We cannot use C# or VB.net. Only Autodesk VBA or VisualLisp
Any ideas? Does it crash only my Civil3D?
Thanks.