VincentG Posted February 20, 2013 Share 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 Link to comment Share on other sites More sharing options...
lisp56 Posted May 21, 2013 Share 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 Link to comment Share on other sites More sharing options...
VincentG Posted May 31, 2013 Author Share Posted May 31, 2013 Thanks a lot, lisp56. Your advice works like a charm. Quote Link to comment Share on other sites More sharing options...
btraemoore Posted June 5, 2013 Share 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 Link to comment Share on other sites More sharing options...
VincentG Posted June 6, 2013 Author Share 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 Link to comment Share on other sites More sharing options...
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.