How to use API to measure the specified area?

I need measure the specified area (Green).

The method is API.

Thanks.

SolidworksApi macros