Updating ColorFillScheme Revit 2022

Hi everyone! I’m trying to update a ColorSchemeEntry. I’ve grabbed the scheme, and the entry, and I’ve changed the color, but running scheme.UpdateEntry(entry) in a transaction doesn’t seem to do anything. I understand color schemes are updated asynchronously, so is there some way to entice Revit to update? ColorFillScheme Class

Code below shows where the magic (should) happen. I’ve tested before and after the selected.Color = DB.Color line and the color is definitely being changed, it’s just not being updated in the scheme. scheme.CanUpdateEntry(selected) passes as well, so I’m allowed to update the entry…

with DB.Transaction(doc, 'Update {} Color'.format(entry_name)) as t:
        t.Start()
        selected.Color = DB.Color(color.red, color.green, color.blue)
        if scheme.CanUpdateEntry(selected):
            scheme.UpdateEntry(selected)
        t.Commit()

Solved it, see forum post: Solved: Re: Update ColorFillScheme Entry (Revit 2022) - Autodesk Community

1 Like