How to get the visible dimensions

How to get the visible dimensions in a 2D drawing and not the hidden dimensions?

SolidworksApi macros