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: 

SubOccurrences property throw COMException

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
FRFR1426
530 Views, 4 Replies

SubOccurrences property throw COMException

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? 

 

Maxence DELANNOY
Manager
Add-ins development for Autodesk software products
http://wiip.fr
4 REPLIES 4
Message 2 of 5
YuhanZhang
in reply to: FRFR1426

Can you upload the data that can reproduce this problem? And which Inventor version you are using?

 

Please don't upload confidential data.



If this solves the problem please click ACCEPT SOLUTION so other people can find it easily.



Rocky Zhang
Inventor API PD
Manufacturing Solutions
Autodesk, Inc.

Message 3 of 5
FRFR1426
in reply to: YuhanZhang

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 Smiley Frustrated)

Maxence DELANNOY
Manager
Add-ins development for Autodesk software products
http://wiip.fr
Message 4 of 5
nagwani
in reply to: FRFR1426

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

Message 5 of 5
FRFR1426
in reply to: nagwani

Found it! I have to test the property Suppressed before accessing to the property SubOccurences.

Maxence DELANNOY
Manager
Add-ins development for Autodesk software products
http://wiip.fr

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

Post to forums  

Autodesk Design & Make Report