See if this helps
Go here at http://docs.autodesk.com/ACD/2010/ENU/AutoCAD%20.NET%20Developer's%20Guide/index.html
This is the AutoCAD .NET Developers guide but at the bottom of the page expand the VBA/ActiveX Code reference
Registered forum members do not see this ad.
I'm trying to run some code from AutoCAD 2006 in AutoCAD 2011 but it's failing on the thisdrawing.open
Run-time error '-2145386445 (80200033)':Code:Sub main() ThisDrawing.Open "C:\CGP1-L-099-PI1-93327-09.DWG" End Sub
Filer error
Has anyone ever come across this? I've been putting off rewriting this in .NET....
Thanks
See if this helps
Go here at http://docs.autodesk.com/ACD/2010/ENU/AutoCAD%20.NET%20Developer's%20Guide/index.html
This is the AutoCAD .NET Developers guide but at the bottom of the page expand the VBA/ActiveX Code reference




I've never looked at 2011, but for 2010 there was a vba something or other that you had to download to get it to work. Same for 2011 maybe?
Never try to teach a pig to sing. It wastes your time and annoys the pig. -Robert Heinlein
I've already downloaded and installed the vba enabler for AutoCAD 2011.
Thanks
It is not posting right
so go to http://docs.autodesk.com/ACD/2010/ENU/AutoCAD%20.NET%20Developer's%20Guide/index.html
and at the bottom expand the VBA/ACTIVEx node
Last edited by Jeff H; 15th Oct 2010 at 03:48 pm. Reason: cv
Try
Dim dwgName As String
dwgName = "c:\Whatever.dwg"
ThisDrawing.Application.Documents.Open dwgName
Bookmarks