Jump to content

Recommended Posts

Posted

Hello:

How to connect to AutoCAD on Windows7 (or Vista) 64-bit from standing alone VB6 application?

 

Why the following code (or similar simple procedures, like ACADDOC.SendCommand...) is producing “Type mismatch” error in above-shown environment.

''sample of code....

 

Public ACADAPP As AcadApplication

Public ACADDOC As AcadDocument

Private Sub GetLength()

Set ACADAPP = GetObject(, "Autocad.Application")

Set ACADDOC = ACADAPP.ActiveDocument

AppActivate ACADAPP.Caption

MsgBox (ACADDOC.Utility.GetDistance(, vbCrLf & "Get Length:"))

End Sub

 

What is the name of reference and location of AutoCAD VBA library on 64-bit OS?

---

For AutoCAD2010 on Windows XP 32-bit those are:

AutoCAD 2010 Type Library (IS IT DIFFERENT IN 64-BIT?)

Location

C:\Program Files\Common Files\Autodesk Shared\acadx18enu.tlb (IS IT DIFFERENT IN 64-BIT?)

---

Any help will be appreciated

 

Alex

Posted

First, presume that you have already installed VBA Enabler for AutoCAD 2010 since isn’t natively supported on this version.

 

Second, I think that using GetObject statement is required to specify AutoCAD version also:

Set ACADAPP = GetObject(, "Autocad.Application[color=red].18[/color]")

Or use CreateObject statement to launch default installation or your workstation:

Set ACADAPP = CreateObject(, "Autocad.Application")

 

Regards,

 

 

PS. Try to use code formatter (# button) to improve readability of your post.

Posted

Unfortunately, adding .18 doesn't help

Set ACADAPP = GetObject(, "Autocad.Application.18") doesn't work.

 

Alex

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...