text box using dimension value

Hello,
I have been trying to create a macro that will  create a text box near the cursor when I click on any face of a view in  drawing.
This  text box value should be the distance of selected face from front  plane.
Any help would be greatly appreciated.
SolidworksApi macros