System.Runtime.InteropServices.COMException was caught
ErrorCode=-2147418113
Message=Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))
Any ideas why Running Inventor 2012 Apprentice, VB.Net 10, I get the above error with the basic setup as shown below?
I will go through a couple of files before it hits the catch and I think it always works on the first retry.
oApprentice = New ApprenticeServerComponent Dim oDoc As ApprenticeServerDrawingDocument = Nothing Try Dim i As Integer = list.Count While System.Math.Max(System.Threading.Interlocked.Decrement(i), i + 1) retry: Try oDoc = oApprentice.Open(list(i)) Catch ex As Exception iTry = iTry + 1 If iTry <= 3 Then GoTo ReTry End If End Try iTry = 0 oDoc.Close() oDoc = Nothing list.RemoveAt(i) UpdateList() End While
same error here, except i'm doing a totally different thing, i think it's because of multiple instances of inventor being launched ... or something that regards th translator plugins, in inventor 2013 i don't have this issue
Hi Kent,
Are you running multiple instances of Inventor? Are you using multiple threads by any chance?
Any info you could provide about the context in which this code is running?
You could also rewrite the code to get rid of
System.Threading.Interlocked.Decrement
I guess it was added by a code converter when you converted --i from C# to VB.NET?
You could use a For Each instead to iterate through the contents of the list.
Thank you,
I'm launching multiple instances of inventor in separate task/thread using the TPL for each instance i get the translator addin and try to save them as a different format, seems that it has something to do with the document beying opened in non visible behaviour
Hi,
did you mean when you use Translator Addin with Inventor = invisible, you got a problem? I do not hear a limitation for such scenario. Could you elaborate or share more information/dataset?