VincentG Posted February 20, 2013 Posted February 20, 2013 I'm running AutoCad Architecture 2013 on Win7 64bit. Installed VBA enabler for Acad2013 64bit version. When start the simple code below: Sub Example_GetPoint() Dim retPnt As Variant retPnt = ThisDrawing.Utility.GetPoint(, "Enter a point: ") ... ... ... ... End Sub It hangs up at "GetPoint". I can't switch to the AutoCAD window to select anything. The only way to get control back is to go to taskbar, right-click the AutoCAD icon and try to close it, then click cancel, I will get control back in VBA Editor. The same thing happens with "SelectOnScreen". But if I run this macro from Autocad directly, everything is fine. Does anyone have same experience or any advice? Thanks a lot. Quote
lisp56 Posted May 21, 2013 Posted May 21, 2013 Hello, same prob in 2011. Do not run the code from VBA-window ! Use ALT+F8 (run macro) in ACAD window, or use a user defined button. Hope i can help you .. greetings from Hamburg/Germany Quote
VincentG Posted May 31, 2013 Author Posted May 31, 2013 Thanks a lot, lisp56. Your advice works like a charm. Quote
btraemoore Posted June 5, 2013 Posted June 5, 2013 why are you using vba at all?? .net is far more superior. There is open source .net development software. #Develop. Quote
VincentG Posted June 6, 2013 Author Posted June 6, 2013 We can start another thread to talk about using .net instead of vba, but in this case, we want to keep using vba because: 1. Over the years, we've got a lot of apps written in VBA. 2. It's easier just to change a few references in order for the old vba apps to run on a newer version of AutoCAD, than to modify the code to VB.net, or even C#. 3. Like Lisp, VBA is more "native" to AutoCAD, although it's losing this close relationship since Autodesk stopped packaging it with AutoCAD. For new projects, we have no problem to choose far more superior .net languages. I've never used #Develop, though. Thanks for pointing it out. It looks quite similar to Visual Studio, I'll take a deeper look. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.