Find upper edge model in drawing view

I have a drawing view, I need to insert dimension (I deal with this) on to the edge programmaticaly . I found all the edges belonging to model. But how to determine the edge is upper or lower?

SolidworksApi macros