Paint Material Surface

Awesome! I will try with that script :grinning:

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.

1 Like

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

ACOPackage 1.0.3 solved this issue.

Another method to get painted walls

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.

1 Like


i am not able to see any objects painted by surface. Can anyone help here

1 Like

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.
:slight_smile: