Hy guys!
I'm writing a addin and experimenting a curious thing. In this line of code I'm opening a DWG file:
documentoDetalhamento = (DrawingDocument)(inventorAPP.Documents.Open(caminhoDocumentoDrawing, true));
The problem: some files open normally, while others make the inventor stop responding. Anyone already see something like that ?
Notices.
First, I tryed to open the document with de Documents.OpenWithOptions :
NameValueMap opcoesAbertura = inventorAPP.TransientObjects.CreateNameValueMap(); opcoesAbertura.Add("DeferUpdates", true); opcoesAbertura.Add("ImportNonInventorDWG", false); opcoesAbertura.Add("SkipAllUnresolvedFiles", true); documentoDetalhamento = (DrawingDocument)(inventorAPP.Documents.OpenWithOptions(caminhoDocumentoDrawing,opcoesAbertura,true));
When Inventor stops to respond, in Visual Studio I click in the "break all" button and :
In Inventor, the only message is displayed below. Importantly, the application stops responding.
The document does not open.
This may sound silly, but got me a couple of times.
Look carefully to make sure no confirmation dialogs appeared anywhere while opening the document.
Had a similar issue where I thought Inventor was hanging but it turned out having Inventor open on one monitor not maximized, visual studio on another monitor, and about 10 other apps the modal confirmation dialog from Inventor didn't always appear on top or even the same monitor as Inventor. So it looked like it was hanging but really it was just waiting for input.