Changing decimal place in drawing dimension

Hi,

I am trying to create a macro for changing the number of decimal places for dimensions in drawing as required.

What i want is when i selected that dimension and called the macro, the decimal place should modify accordingly.

I am also trying for a pop up tool bar for selecting the number of decimal place. This will pop up when ever i create a new dimension.

Pls help me out.

SolidworksApi macros