There are a few options for grabbing IGtol objects. Take a look at the list of Accessors on this page: 2012 SOLIDWORKS API Help - IGtol Interface. From your description, it sounds like the macro already loops over every annotation and is probably checking if it is a dimension? In addition to checking if it is a dimension, you can check if it is a Gtol.
I haven't dealt with Dimension or GTol before, but from the documentation, I suspect it would look roughly like this:
Dim swAnnotation As SldWorks.IAnnotation
Dim swDimension As SldWorks.IDimension
Dim swGtol As SldWorks.IGtol
Dim arrayOfAnnotations As Variant
'build the arrayOfAnnotations
'loop over the array of annotations and grab it's interface if it is a dimension or gtol
For Each swAnnotation in arrayOfAnnotations
Select Case swAnnotation.GetType
Set swDimension = swAnnotation.
Set swGtol = swAnnotation.
Brilliant, that is the information I need.
And yes, already loops through annotations.