You would need to do a couple of things since the text from a dimension is represented by <> plus the overrides if they exist.
You would need to extract the current text of the dimension (i.e. any text overrides) then the text size and style, plus the dimension length, formatted into a string as specified by the dimension style, then strcat the whole thing together and use something similar to
this to returm the bounding box.