When trying to loop on sub occurrences, on some assemblies, the property SubOccurences thow a COMException:
System.Runtime.InteropServices.COMException (0x80004005): Erreur non spécifiée (Exception de HRESULT : 0x80004005 (E_FAIL)) à System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData) à Inventor.ComponentOccurrence.get_SubOccurrences()
What can cause this type of error?
Solved! Go to Solution.
Solved by nagwani. Go to Solution.
Can you upload the data that can reproduce this problem? And which Inventor version you are using?
Please don't upload confidential data.
The problem occurs on Inventor Suite 2011 SP2 (Build 150309200, 309). I will upload some data, but via ADN DevHelp because the data is confidential (when it will work, which is not the case right now. I can not connect )
Hi There,
I had similar issue once, and I found that if your are not in Master LOD and some of the occurrences have been suppresses then getting SubOccurrences from suppressed Occurrence would fail.
Regards,
-Ishwar N
Found it! I have to test the property Suppressed before accessing to the property SubOccurences.