getting minimum distance between point and sketch segment

Hi..

I have a point and no of sketch segments. Now i want to perform distance check from the points on all sketch segments and find out point on sketch segments with minimum distance. The point can be on any sketch segment depending upon the minimum distance criteria.. How can I acheive this..  The sketch segments can be anything i.e Curve , line.

Plz help me guys.. .

SolidworksApi macros