
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm really hoping that someone can help.
I just upgraded from AutoCAD 2015 to AutoCAD 2016 and now my VBA App (which I spent the last several months developing) won't work. Here is the issue. Keep in mind that this all ran flawlessly in AutoCAD 2015.
There are a couple of places whereI have to use the SendCommand function due to a VBA method not being available or the users wanting visual feedback (gohsting and what-not) that you can't do in VBA. Whenever I use the SendComman more than once it results in this run-time error.
Here is some example code:
Sub test() ThisDrawing.SendCommand "(command ""PLINE"")" & vbCr ThisDrawing.SendCommand "(command ""PLINE"")" & vbCr '<- This line errors End Sub
If i run this from AutoCAD using:
-VBARUN "test" or (vl-vbarun "test")
it results in the error above whne trying to run the second SendCommand. The first SendCommand run fine. I've tried seperating them out into different sub routines but the result is the same.
Here is the intersting part. If I exectur this code from the VBAIDE it runs perfectly fine. The error only occurs when I execute it from AutoCAD.
Any help would be greatly apriciated. Thanks!
Solved! Go to Solution.