Surface selection by script automatically.

Hello,
I want to create a script which should help me in identifying the surfaces automatically from an assembly.

Here i want to identify surfaces automatically and create contacts/Ties out of those.
Let me know if there are any approaches for this.

Thanks in Advance.