Re-measure when out of tolerance

Re-measure when out of tolerance

Is there a way to re-measure an out of tolerance feature within a loop?  The tolerance is a constructed feature and the issue I'm having is with debris on the part.  I'm sure this is very vague but it seems that I would have to use vb script but not sure.  What I want it to do is once the feature is reported as out of tolerance I would like to beable to go back to the line in the program for that particular sample and remeasure.