Change actor properties through code?

This example code does not work for me on Slicer 5.6.2 (the 3D model appearance does not change at all)