Macro

Does anyone have a macro to code the top of the ore surface from a blockmodel?