Finding overridden items in views?

Just curious if anyone’s come across a script to find over ridden items in views in revit? Eg when someone overrides the colour of an item in a specific view only.

Looking to create a process to evaluate model “health” and if people are overriding too often when they can be using filters its not good practice. Need to be able to find the over-ridden items and interrogate them though so wondering if its achievable in dynamo / has anyone else looked into this.

Hi, see below:

Element Color Overrides.dyn (8.5 KB)

import clr
from Autodesk.Revit.DB import *

elements = UnwrapElement(IN[0])
doc = UnwrapElement(IN[1])
view = UnwrapElement(IN[2])

if not hasattr(elements, '__iter__'):
	elements = [elements]
overrides_all = []
for element in elements:
	id = element.Id
	overrides = view.GetElementOverrides(id)
	color_cut_fill = overrides.CutFillColor.IsValid
	color_cut_line = overrides.CutLineColor.IsValid
	color_proj_fill = overrides.ProjectionFillColor.IsValid
	color_proj_line = overrides.ProjectionLineColor.IsValid
	color_test = any([color_cut_fill,
	overrides_all.append([element, color_test])
OUT = overrides_all

In the above script, I get the OverrideGraphicSettings for each element, from which I determine the Cut and Projection colors for both Fill and Line. If any of the 4 colors are valid (meaning they have been overridden), I return True.