Separate dimension with difference face

Hi all,
Recently I prepare a dynamo script for automatic wall panel dimension along with opening. But the problem is all dimension in one direction not separately like top face or bottom face (see the attached snip).
If anyone have any suggestion how to get separate dimension with difference face if possible in Dynamo or Python please suggest.

Thank You