How to set entities to a specific elevation (z)

That is a bit drastic. The Ruby code is rather simple. I just posted an example.