Hi @j.pavlicek. The best way to know for sure about these sorts of things is to investigate them. If you have large and complex assemblies in which many of the files may have various other types of documents attached to them, and you are unsure about if all documents returned by the 'ReferencedDocuments' will return any of those other types of documents, then I would suggest setting up a loop of those documents that checks the document type of each one and uses a feedback message or makes log entries inside of the loop that will report to you what it finds. But beyond that, here is one of those 'fancy' codes that uses the IEnumerable functionality to filter the collection to only AssemblyDocuments and PartDocuments.
Dim oADoc As AssemblyDocument = ThisApplication.ActiveDocument
Dim oAllModelDocs As IEnumerable(Of Inventor.Document) = oADoc.ReferencedDocuments.Cast(Of Inventor.Document) _
.Where(Function(d) d.DocumentType = DocumentTypeEnum.kAssemblyDocumentObject Or _
d.DocumentType = DocumentTypeEnum.kPartDocumentObject)
'now you can use that oAllModelDocs variable here
This filtering code does not attempt to filter out things like Content Center stuff, iPart/iAssembly/ModelState member type documents (vs FactoryDocument), or other such things though. If you want to be more thorough though, you will probably just have to use a traditional loop with more filtering check type codes within, to make sure you are left with only the ones you want.
Wesley Crihfield
(Not an Autodesk Employee)