Color mesh/directshape in different colors based on z-values


I have created a mesh and transfered it into Revit using the Mesh.ByPointfaceIndices and DirectShape.ByMesh Method. I would like to display the mesh in different colors based on the z-values of the points, so it looks like the surface below. Is there an easy way to do it or do I need a huge python script?

Thanks in advance!

1 Like