Yes.
You seem to be new to the Revit API, so first of all I welcome you to this discussion group.
Before anything else, please work through the getting started material:
https://thebuildingcoder.typepad.com/blog/about-the-author.html#2
That will answer these questions of yours, and many more besides.
Secondly, obviously, please always search for existing answers before raising new questions here.
Many Revit element properties such and with are height are available through the parameters that you see in the user interface in the element property panel.
You should install RevitLookup to explore the Revit database, its elements, their properties and relationships interactively through the API:
https://github.com/jeremytammik/RevitLookup
You can also query an element for its geometry and then calculate these properties yourself from that.
The distance could also be determined from the two elements' geometry, and in other ways as well.
Best regards,
Jeremy