The only way to read that programmatically would be if the vendor exposed this information as an attribute via their XML file. I looked at a couple of Basler aces that I have, and none of them seemed to have that information. They have an attribute called PixelSize, but that refers to bits per pixel and not the physical size. I skimmed the GenICam Standard Features Naming Convention to see if there is a standard GenICam feature for what you're looking for and didn't see one. Unfortunately it seems like you won't be able to get that information programmatically.