Looking for a way to detect undefined entities in a sketch

Obviously entities in a solidworks sketch change their color from blue to black once fully defined. In some cases a user might have drown a small (undefined) entity which might be difficult to spot at the end of the sketching process, it would be helpful to have a method which would count (and maybe even locate undefined entities).

Has someone ever pondered about this ?

Since solidworks changes the color when an entity becomes fully defined it might be possible that one can query this state somewhere.

SolidworksApi macros