Test for unassociated dimensions

Is there a test for unassociated dimensions in a drawing? I am afraid my current method of crashing in the middle of running the journal when it finds a hidden, unassociated dimension is not the most efficient way of operating.

Dimensions that have lost some or all of its associativity are known as 'retained' dimensions. NXOpen dimension objects have an .IsRetained property (boolean value) that will give you the status of the dimension.

Thanks. That worked like a charm after I knew the right term to look for.