How to check the intersection b/w the two sketch segments

How to check the intersection b/w the two sketch segments in the sketch mode with any type of sketch enity.

Whether it is intersected or not and if it is intersected then we need the intersection point.

If anybody have the code for this then share to me that  is very helpful..

SolidworksApi macros