Need Help Coloring Elements by Material GWP – Getting Errors in Script

You screenshot is entirely illegible. Read up on how to export your workspace as an image and post that so we can have some context.

Usually this type of issue is because you aren’t reading the right element - i.e. you’re looking at the instances instead of the types, or the elements instead of the materials, etc..

For the display, I also recommend not doing any sort of override in view. That’s problematic as it’s a manual process to remove them and it gets ugly quick. Instead write to a parameter on the element, and let a filter do the overrides.