I am running into this same problem. I tried the COM Interop example that Tony Tanzillo gave but it still throws that error when I try to open it. My file was generated by a third-party tool as well.
I'm having the same problem too. Seem to only happen with dwg files created from something other than autodesk products. Drawings open fine directly through AutoCAD (2011), but noth with vba. Also works fine with 2010.
I ended up using a workaround for the problem. The operation that I needed to do did NOT require opening the drawing so I just opened it using Database.ReadDwgFile. It didn't throw any exceptions by doing it this way.
This problem is related to the DWGCHECK system variable, set it to 2 , the default is 1, this problem also apears in VBA but with a different error message, something like "Filer error" , but the "solution" is the same set DWGCHECK=2.
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register
Start with some of our most frequented solutions to get help installing your software.