I'm using C# to create an addin to AutoCAD 2012, I'm currently having problems reading in files from previous version of AutoCAD (2009 and earlier) I was wondering if there is another way to open files other than:
Application.DocumentManager.Open(filepath)
to open a drawing? What I'm getting when I try that way is a stackoverflow.
Hi,
Your question should be in the .NET section instead of ARX 🙂
When opening/closing documents through the Editor object you should make sure you are in session context - your command is declared with CommandFlags.Session
You can also open drawings in the background without showing them in the user interface. You can find various samples which are using the Database.ReadDwgFile function to do that, e.g. : http://through-the-interface.typepad.com/through_the_interface/2006/08/breaking_it_dow.html
I hope this helps.
Cheers,
Adam Nagy
Autodesk Developer Network