Sorry I missed the last line on your previous post. I found the API Property you're looking at, ComponentOccurrences.AllReferencedOccurrences:
Input DocumentDescriptor, ComponentDefinition or a Document object. All occurrences that reference the given object are returned.
I don't think it means it returns all matching component definitions, I think it means it returns all occurrences that reference that component definition or document such as geometric projections or parameter links.
The only other possible shortcut I see is ComponentOccurrences.AllLeafOccurrences([LeafDefinition] As Variant) As ComponentOccurrencesEnumerator:
Occurence to be used as the basis for filtering the leaf space for a given leaf occurence. This is an optional argument whose default value is null.
But the description for that is more confusing than AllReferencedOccurrences. Other than that, I don't see a quick way to build a collection of matching occurrences. It looks like you'll have to build the collection yourself using a simple For loop to find all matching parts in some way. The example below makes an object collection of component occurrences with the part number 22990002:
Dim oCompOccs As Collection
For Each oCompOcc As ComponentOccurrence In ThisDoc.Document.ComponentDefinition.Occurrences
If iProperties.Value(oCompOcc.Name, "Project", "Part Number") = "22990002" Then oCompOccs.Add(oCompOcc)
Next
Good luck with your project.