Color elements by workset / Assign material by workset for IFC export

Hello everybody,

I am looking for a way to export an IFC where objects of the same workset have the same color. I did some research and it seems that the way to do it is by applying the same material to those elements (filters are not visible in IFC). Since there are a lot of elements in the model I tried to apply materials using Dynamo.

There are 4 ways to apply materials in Revit:

  1. By category or subcategory
  2. By family
  3. By element parameter
  4. By face of element geometry using paint

Assigning materials by category does not solve my problem since there are elements of the same category in different worksets.

In the case of families, there is the following issue. Families contain nested families, whose parameters cannot be accessed by Dynamo if the nested families are not shared. At the same time, to make the nested families shared, one should access the nested family parameters.

As for single elements, there are some elements that don’t have a parameter of type “Material” and when I create one it is not recognized, meaning that the element does not take the color of the material assigned to the parameter.

Finally, painting element geometry only works for some of the elements.

Do you have any idea on how I can fix any of those issues? Also, feel free to propose another solution. As I said, the end goal is to get an IFC where elements are colored by workset.

Thanks in advance :slight_smile:

Happy to be proven wrong- but I’m not sure this is possible- using Dynamo or otherwise
The limiting factor seems to be the standard Revit IFC exporters- which are pretty basic (that is being kind)

I’m no expert in the IFC format- but understand that by default colours are based on materials, but this can be overridden per object using IfcSurfaceStyle

I’ve been dabbling with BlenderBIM recently- any kind of IFC post-processing probably isn’t the answer to your question- but it is pretty awesome for the price.

Basically export IFC from Revit and open in Blender. Since all the object properties come across including workset, it is relatively simple to apply a colour to sets of objects. It’s probably best to restructure the model into collections based on workset

IFC properties in Blender

coloured IFC round-trip back into Revit

Great! Could you explain more how you bring the model back to Revit? Onde I tried to export from Revit and open it on Blender, exported IFC from Blender it is not recognized by Revit anymore.

Any tips?