Tip: Make sure to account for the global scale factor when reading PMI dimension tolerances

When extracting dimension tolerances from CAD PMI, we found cases where the values we were showing for dimensions did not match what we saw rendered in the PMI. Techsoft support helped identify the problem and I thought I’d share in case it helps others.

The key is to account for A3DMDDimensionValueFormatData::m_dGlobFact. The comment in the header file indicates that this is the “Global Multiplying Factor”. If you don’t include this your values could be wrong in certain CAD files. Many CAD files were correct, but we started seeing cases where the numbers were not correct, so it depends on the specific CAD file as to whether this comes into play.

We did the below.

    double globalMultiplyingFactor = valueFormatData.m_dGlobFact != 0 ? valueFormatData.m_dGlobFact : 1.0;

We apply this to the main tolerance value as well as the superior (plus) and inferior (minus) values.