You need to traverse all dimensions (View::GetDisplayDimensions) and then check the value (IDisplayDimension::GetDimension->IDimension::GetValue3) of each one. And once the dimension is found use the IDisplayDimension::GetAnnotation->IAnnotation::Select3 to select the dimension.
Thanks for the reply Artem,
I tried it already, I need to select the dimension based on its precision value i.e There are dimension in a drawing with two and three precision value, and the macro need to all the dimension with two precision. Please help me to sort it out.
Sorry for late reply!!