Automated Building Code Compliance Checking

Hi,
This is how the Building Code defines the Height, i hope its not too complicated
“The upper reference point for the determination of the fixed building height is the upper roof boundary edge. For pitched roofs this is the outer intersection of the two roof thighs (ridge), with single pitched roofs the highest intersection of the rising outer wall with the roof cladding and with flat roofs the uppermost end of the wall (Attica)
The lower reference point is the building side walkway trailing edge of the planned access road, measured perpendicularly in front of the building center on the side facing the access road”
I think it is in generally the distance from the top of the Terrain to the highest Point of the Building.
How can i measure the distance between the site (top of the terrain) and the highest point?
I found something but it does not give me the highest Point.

I can not get any further with the areas, I can get the areas out of the components, for example from the storey ceilings, but I do not know how to get the floor space of the building.
And how can I compare the height of the building with a list / table and then classify the building into a specific class? As described above.

Thank you in advance
:slightly_smiling_face: