get upper/lower-most surfaces in drawing

Is there a simple way to return the upper and lower-mostsurfaces/edges/points in a drawing/drawing view?

I am looking for a way to place overall (height and width)dimensions on an assembly who's components will be changing(internal ID's of dimension references change).

SolidworksApi macros