Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB 6.0 project. Updating to work in AutoCad 2002 from R14

Status
Not open for further replies.

snb123

Programmer
Jun 12, 2003
6
US
my program is written in vb6.0. the program runs great under autocad R14 but not under autocad 2002.

autocad 2002 opens okay from the program, however when it comes to the following line

AutoCDoc.new "c:\program files\AutoCad 2002\template\acad.dwt"

i receive an error

-2145320848 method not available in MDI mode Use open method of documents collection. i'm not sure what is missing. what do i need to change to make this work.


 
Hi snb123,


Try this:

You've obviously set up a refence to the AutoCAD 2000 library (this is still classed as 2000, even for 2002)?!?!

Then try this code:
Code:
Dim ACADapp As New AcadApplication  'New instance of AutocAD Application..
Dim AcadCDoc As New AcadDocument  'New Document..

Set AcadCDoc = ACADapp.Documents.Open("C:\Program Files\AutoCad 2002\Template\acad.dwt")

....obviously include all other relevant code for you program..


Let me know if this works OK..




Cheers,

Renegade..


BULLET-PROOF DESiGNZ
renegade@tiscali.co.uk
 
thanks for your help. i'm still having problems converting all the code. Can I email you a small portion to see what i'm still doing wrong.
 
Hi snb123,

By all means, please email the code. My address is below..


Cheers,

Renegade..


BULLET-PROOF DESiGNZ
renegade@tiscali.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top