How to measure height and width of a face based on a specific mat ID?


Hi (noob alert)

OK here it goes.

I have a simple box that’s been converted to editable poly and have been assigned multiple ID channels to.
now I need a code to loop through each IDs and select the face based on the ID and get the edge measurements and print something like this for example:
box001 faceID#1= 10*15
box001 faceID#2= 12.5 * 14
and so on.

what do you suggest?