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.
Thanks for the quick reply, but I need to open the drawing. I wonder why it is different between 2010 and 2011?
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.
Regards,
Gaston Nunez
Can't find what you're looking for? Ask the community or share your knowledge.