Simple material swap python script not working

I really don’t understand, over a year now and cannot get this working!

I’m even using Revit and the AdvancedGlassPack materials which is exactly what this script is using
https://gist.github.com/mdaguerre/8f…48eba3d0d78075

It’s using the exact smae same names even, yet the python script does not work.

I don’t understand why it’s so easy for everyone :frowning: