Message 1 of 2
Disconnected Referenced Files

Not applicable
11-18-2015
12:27 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm using the attached code to obtain a referenced document from Inventor's document cache. Sometimes it returns a document that seems to be disconnected from Inventor. Is there anyway to flush Inventor of all disconnected components without performing a close all? Or is there a clause I can add to my code that will ignore any disconnected parts? This is causing a problem because, when I try to use the returned disconnected document, my program throws an exception. So far, the only way I've found to overcome this issue is to close all documents.
Thanks,
Exception Message: The object invoked has disconnected from its clients. (Exception from HRESULT: 0x80010108 (RPC_E_DISCONNECTED))
// Cycle through the Inventor application documents. foreach (Document _doc1 in from Document _doc1 in Application.Documents where _doc1.FileSaveCounter != 0 where !string.IsNullOrEmpty(_doc1.FullFileName) where _doc1.FullFileName.Contains(_fullFileName) select _doc1) { _docList.Add(_doc1); return _doc1; }