Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Open DWG file stops Inventor 2014 - C#

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
322 Views, 2 Replies

Open DWG file stops Inventor 2014 - C#

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 ?

 

Tags (1)
2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: Anonymous

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 :

 

Break all

 

 

In Inventor, the only message is displayed below. Importantly, the application stops responding.

 

Message

 

The document does not open.

 

Message 3 of 3
rjay75
in reply to: Anonymous

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.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report