Awesome! I will try with that script 
I’m getting the same error. Did you ever get this resolved? Thanks!
Dear @steinah6,
I found the solution for this issue. You can use version of René’s Python Script and you just adjust this line to : elemRef = surf.Tags.LookupTag(“RevitFaceReference”) instead of elemRef = surf.Tags.LookupTag(‘RevitFaceReference’)
It works fine for me.
I appreciate all of help from @Organon,@Kulkul and @MartinSpence.
Thank you so much.
Hello
When using your script, I encountered the same problem as @Elie.Trad . I tried replacing the lines as wrote @thuanamd , but this did not help. Is it possible that this is due to the fact that elements of complex shape and they are “cut out” of each other in revit?
As I understand it, he is trying to color the face returned by the GetGeometryObjectFromReference (elemRef) method, this method returns all geometry objects, in addition to faces, edges, curves, etc.
Therefore, when trying to color the curve, an error is generated.
Is there any way to add a check on python: “so that it only paints those face geometric objects which are “Face” surfaces”. or “if it is impossible to paint on a surface, then this surface is skipped and the script works further”?
Thank you
Hi, this works great in R2020 (except for elements with split surface), but fails in R2022 with the following warning:
Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed.
Traceback (most recent call last):
File “”, line 22, in
TypeError: iteration over non-sequence of type Wall
Is there an easy fix for this (I have zero Python ability)?
Thanks.
Edit: Apologies, apparently it does work.
Hi! At the begining I had the same issue than you, but you must put in Inputs ( IN[0] ) a list of elements, if you put a single element doesn’t work.
![]()
"Hi MartinSpence, your code runs very well for walls, but it doesn’t work for columns unless the column is painted first with Revit’s default tool before running the command. I’m not sure what could be happening; could you please explain it to me? Thank you very much!
Hello, for columns that haven’t been painted with Revit’s default tool beforehand, I cannot paint them using this command. I would appreciate your assistance. Thank you very much.



