In assembly how to check the selected face mate with some other component face

Hi

Am trying to create a macro to check all the end are closed by caps in open end of tubes in assembly..

In that I found out the face , after that I have to check that's Face mate with cap.

Please help me to resolve this.

Regards

Manikandan

SolidworksApi macros