With a drawing open, how to automatically edit dimension text of all the existing dimensions?

My goal is to create a macro which does the following:

  1. Detect all the dimensions in a currently active drawing
  2. For each dimension, prepend a number surrounded by circle before the existing dimension text, in a incremental basis.

For example, let's say my drawing has 4 dimensions. Each dimension text is:

  1. ""
  2. ""
  3. ""
  4. ""

After macro runs, each dimension text must be edited to the following:

1. ""

2. ""

3. ""

4. ""

This way, each dimension gets a unique number. I believe this is possible but I am new to SolidWorks macro and not sure how to do this. Any help or advice is appreciated.

Thank you

SolidworksApi macros