your last phrase is the key....
measure the period and length very accurately, and from this you can calculate the local acceleration due to gravity
the period of a pendulum is
P = 2pi Sqrt[L/g]
squaring both sides and solving for g, you get
g = 4 pi^2 L/P^2
now, the local value of g varies with distance from the center of the earth:
g = GM/r^2 where r is the distance from the center of the earth, G is the newtonian grav constant and M is the mass of the earth
you know that at the surface of the earth, g=9.8m/s/s, so if R is the radius of the earth and h is the height of the building, you can show that
g(at top of building) = 9.8m/s/s (R/(R+h))^2
since R>>h, you will need extremely accurate readings of P and L, but in theory you could measure the height of the building this way