Message 1 of 7
Enable BOM recursively. Error 0x80004005.

Not applicable
08-12-2013
01:42 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
' Set a reference to the assembly document. ' This assumes an assembly document is active. Dim invDoc As Document invDoc = ThisApplication.ActiveDocument 'Set Reference Dim oBOM As BOM 'Check all sub-documents inside the active Inventor document For Each invDoc In invDoc.AllReferencedDocuments 'If a sub-document is an assembly... If invDoc.DocumentType = kAssemblyDocumentObject Then oBOM = invDoc.ComponentDefinition.BOM oBOM.StructuredViewEnabled = True oBOM.StructuredViewFirstLevelOnly = False oBOM.PartsOnlyViewEnabled = True End If Next 'update the files InventorVb.DocumentUpdate()
I used the code above and it worked on big assemblies before. But it doesn't seems to work anymore on big assemblies :(. Anyone knows why it doesn't work anymore?
I got the following error message:
Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))