The difference between inside cylinder and outside cylinder

I have a problem about the cylinder

I can get the surface wich is a cylinder

Is there any way that can distinguish this cylinder is a hole or entity just like the figure below?

SolidworksApi macros