How to get spot elevation by point and insert it in a dimension tag?

That’s strange, but SpotElevation.ByPoint doesn’t work with pipes at me.
Check this discussion.