Ovverride colors Surface in 3D view, Archilab

REVIT 2019 Dynamo 2.03
Hello,
I am trying to ovveride color elements.
After working on warnings and skim through elements and working on the list I was able to match
the exact number of elements retrieved with a color to be assigned.
So I am coming to graph with 2 lists, elements and colors
Than I worked on Archilab solutions as a base but I do not know why
it does not accept.

Here the script:

  1. IN[0] is an element,

  2. IN[1] is a color from the Color

  3. import clr

  4. clr.AddReference(“RevitNodes”)

  5. import Revit

  6. clr.ImportExtensions(Revit.Elements)

  7. clr.AddReference(“RevitServices”)

  8. import RevitServices

  9. from RevitServices.Persistence import DocumentManager

  10. from RevitServices.Transactions import TransactionManager

  11. doc = DocumentManager.Instance.CurrentDBDocument

  12. clr.AddReference(“RevitAPI”)

  13. import Autodesk

  14. from Autodesk.Revit.DB import *

  15. import sys

  16. pyt_path = r’C:\Program Files (x86)\IronPython 2.7\Lib’

  17. sys.path.append(pyt_path)

  18. def OverrideColorPattern(e, c):

  19. gSettings = OverrideGraphicSettings()
    
  20. gSettings.SetSurfaceForegroundPatternColor(c)
    
  21. gSettings.SetProjectionLineColor(c)
    
  22. gSettings.SetSurfaceBackgroundPatternColor(c)
    
  23. UnwrapElement(view).SetElementOverrides(UnwrapElement(e).Id, gSettings)
    
  24. return e
    
  25. ele = UnwrapElement(IN[0])

  26. col = UnwrapElement(IN[1])

  27. try:

  28. errorReport = None
    
  29. output = []
    
  30. i=0
    
  31. while i < len(ele) :
    
  32.    C=col[i]
    
  33.    E=ele[i]
    
  34.    TransactionManager.Instance.EnsureInTransaction(doc)
    
  35.    output.append(OverrideColorPattern(E,C));
    
  36.    TransactionManager.Instance.TransactionTaskDone()
    
  37.    i=i+1
    
  38. except:

  39. import traceback
    
  40. errorReport = traceback.format_exc()
    
  41. if errorReport == None:

  42. OUT = output
    
  43. else:

  44. OUT = errorReport

I got this error


Secondary I would love to be able to use the ovveride element color node, but
also that one I am not able to fill it properly, maybe I just awake dumb today.
Cheers.