Message 1 of 6
I get an error trying to call AutoCAD 2011 from Visual Basic

Not applicable
03-02-2011
03:57 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I get an error trying to call AutoCAD 2011 from Visual Basic. I am not an expert in programming so im trying to find out how to call AutoCAD 2011 from VB.
Private Sub Next_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)Handles Next.Click
Dim ACAD As Autodesk.AutoCAD.Interop.AcadApplication
ACAD = CreateObject("autocad.Application.18")
ACAD.ActiveDocument.SaveAs("new")
ACAD.ActiveDocument.Save()
ACAD.ActiveDocument.Close()
end sub
but everytime i get to the third line, i get an activeX error.
i am really stuck here because i've tryied everything i know and everything i've found on the internet.
thank you