Here is an example that i modified from the api helper. It can be found... Top right > (?) icon > "help" > "api helper" >
search "Analyze" an you should be able to find it.
This is very cool though, didn't know about it.
Dim oAss As AssemblyDocument = ThisApplication.ActiveDocument
Dim oSelectedOccs As ObjectCollection
oSelectedOccs = ThisApplication.TransientObjects.CreateObjectCollection
Dim oOcc As ComponentOccurrence
For Each oOcc In oAss.ComponentDefinition.Occurrences
If Not oOcc.Name = "blue part:1"
oSelectedOccs.Add(oOcc)
End If
Next
Dim oCheckSet As ObjectCollection
oCheckSet = ThisApplication.TransientObjects.CreateObjectCollection
Dim obj2 As ComponentOccurrence
obj2 = oAss.ComponentDefinition.Occurrences.ItemByName("blue part:1")
oCheckSet.Add(obj2)
Dim oResults As InterferenceResults
oResults = oAss.ComponentDefinition.AnalyzeInterference(oSelectedOccs, oCheckSet)
MessageBox.Show(oResults.Count)
Dim oResult As InterferenceResult
For Each oResult In oResults
oResult.OccurrenceOne.Delete
Next