- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi @KWarrenCA. It seems clear that the code you posted is just part of a larger block of code, because there does not appear to be a Sub Main or a declaration line for the oListComp variable. Have you considered using the ComponentOccurrences.AllReferencedComponents(Object) method? You can supply a DocumentDescriptor, ComponentOccurrence, or Document as input, and it will return a ComponentOccurrencesEnumerator containing every component that references the input. You may be able to use that from the top/main assembly's AssemblyComponentDefinition.Occurrences property, and it will reach every level of the assembly. Then you could iterate the components in the returned collection to gather the needed data. Just one thought that crossed my mind when I read your post.
Wesley Crihfield
(Not an Autodesk Employee)