Jump to content

Recommended Posts

Posted

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 "SelectOnSc​reen". But if I run this macro from Autocad directly, everything is fine.

 

Does anyone have same experience or any advice? Thanks a lot.

  • 3 months later...
Posted

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

  • 2 weeks later...
Posted

Thanks a lot, lisp56. Your advice works like a charm.

Posted

why are you using vba at all?? .net is far more superior. There is open source .net development software. #Develop.

Posted

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.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...