Painting Family Generic model Faces using Dynamo?

Hi, I have generated a solid from surface thickening and create a family instance from it into Revit using the spring node. The family is under “floor category” and Generic model Type". I’m hoping to be able to pick specific faces from my geometry and paint it with specific materials. I was wandering around but didn’t found much about this topic. I’m not sure if there’s any specific node that could do the job. The python script I have picked works maybe with walls and rooms which is not the case for me here. I have tried a couple of methods to see how the script works and got two different error messages and I couldn’t figure them out. (please see attached).
I’m having kinda complex geometry and for this thread, I’m testing on this simpler one and hope to get it to work. Your help will be much appreciated. Thank you.

My guessing for the second error message is because I’m working in the Project Workspace. I’m trying now to :

  1. Background Open Family Document
  2. Get the Elements on that document
  3. Extract the faces
  4. Apply Painting
  5. Close the document
    I’m not sure about the outcome if the family inside the project will update or not, but I’m pretty sure that if i can try it out it could work.
    The problem here is that I was able to Open the family document, but I have no idea how I can use that document to get the element inside it with their family document manager ID’s.
    Are there any specific nodes that can help me with this workflow?
    Thank you