C# Algorithm to determine ID Bore of part rather than Outer Diameter (Boolean)?

I would like to programmatically determine whether a diameter value on a print is an ID/Bore or an Outer Diameter.   Has anyone developed such algorithm or could you suggest a method of going about this?

Your time and efforts is much appreciated.

SolidworksApi macros