TheSwamp

Code Red => VB(A) => Topic started by: NYacad on February 24, 2010, 09:57:15 PM

Title: GetObject (AutoCAD2010-64 bit) from VB6 on Windows7 (64-bit)
Post by: NYacad on February 24, 2010, 09:57:15 PM
Hello:
How to Get AutoCAD on Windows7 (or Vista) 64-bit from standing alone VB6 application?
The following code (or similar simple procedures, like ACADDOC.SendCommand...) is producing “Type mismatch” error on above-shown environment.

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

Changing to ... GetObject(, "Autocad.Application.18") doesn't help

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

For AutoCAD2010 on Windows XP 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.
One more question: is it possible to install additional and have two OS (Windows XP and Windows 7) on one PC?

Alex
Title: Re: GetObject (AutoCAD2010-64 bit) from VB6 on Windows7 (64-bit)
Post by: sinc on February 25, 2010, 11:49:52 PM
Maybe one of these?

C:\Program Files\Common Files\Autodesk Shared\acax18enu.tlb
C:\Program Files (x86)\Common Files\Autodesk Shared\acax18enu.tlb