How to get curve apex(s) from 3D sketch

I have a 3D sketch that consists of several straigth lines, connected by 180 degree U bends.
I need to highlight the locations of these bend apexes using points. How do I locate these bend apex location in xyz?

SolidworksApi macros