How to make a color legend in Revit?

I made a script there colorize elements by the type.


Now i want to make a legend where the different colors is listet together with the different types, so some sort of color scheme. Do you guys have som ideas??
I already have the color and element type name, i just need som sort of list in a legend.

The script as it is till now:
Color code elements.dyn (37.1 KB)


It’s pretty easy to make a legend in Dynamo, but if you want something you can actually place in your view that’s going to require a lot more work.

I am not sure if there are any components/nodes in Dynamo that would help you achieve this. However, there are couple of different ways that I can think of that would allow you to make a Legend in Revit:

  • you can create legends for Analysis Visualization Framework
  • you could simply draw one using a Drafting View, Filled Regions and some Text Notes
  • you can use a Key Schedule and split the Title into sub-cells, then set their color/formatting etc.

Here’s a potential result using the Key Schedule route:


It comes from a schedule like this:


I just turned off Headers, and all borders. Pretty easy to make.

For the AVF legend, you would need an actual analysis, which would be more work. Have a look at this write up:

I don’t think I need to show you an example of how to make a Legend using a Drafting View. That would be a question for a different forum i think.


Thanks, that Key Schedule looks like something i could use, can you help me get startet?

The above key schedule workflow is ALL revit. There is no Dynamo component to it. Like I said: just create a new key schedule, and split the title cell into rows/columns. Then you can apply formatting and hide borders. Turn off Headers and you are good. That’s all it is.