Is there a way to find broken assemblies in solidworks?

Hi want to write a program using c# that opens up solidworks assemblies in a large drive and find assemblies with broken part refrences and fix them accordingly. I was tried to access errors and warnings using WhatsWrong but that didnt give back anything consistent.

SolidworksApi macros