# Coloring rooms after performing matching operation on lists

**URL:** <https://forum.dynamobim.com/t/coloring-rooms-after-performing-matching-operation-on-lists/24805>\
**Category:** Revit\
**Tags:** revit, excel, python, dynamo, rooms\
**Created:** [August 14, 2018, 10:33am UTC](https://forum.dynamobim.com/t/coloring-rooms-after-performing-matching-operation-on-lists/24805 "2018-08-14T10:33:27Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![mohammadarslan](https://avatars.discourse-cdn.com/v4/letter/m/d07c76/32.png) [@mohammadarslan](https://forum.dynamobim.com/u/mohammadarslan)\
**Post date:** [August 14, 2018, 10:33am UTC](https://forum.dynamobim.com/t/coloring-rooms-after-performing-matching-operation-on-lists/24805/1 "2018-08-14T10:33:27Z")

</div>

Hi everyone,

With the reference to the previous post ( [Comparing two lists and finding the common entries](https://forum.dynamobim.com/t/comparing-two-lists-and-finding-the-common-entries/24760)), I still not able to color the rooms after performing a check on two lists. Does anyone have any idea on this? I am first comparing the lists, based on the matching entries and I am trying to color the rooms.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/b/bbd903bb07759f79d12c48368642a385bacf582d.png) [1.dyn](https://forum.dynamobim.com/uploads/short-url/tudhd3zchKJ66SMTvB7xLehV7Ut.dyn) (20.1 KB)

---

<div class="post-metadata">

**Author:** ![Jonathan.Olesen](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jonathan.olesen/32/44242_2.png) [@Jonathan.Olesen](https://forum.dynamobim.com/u/Jonathan.Olesen)\
**Post date:** [August 14, 2018, 10:39am UTC](https://forum.dynamobim.com/t/coloring-rooms-after-performing-matching-operation-on-lists/24805/2 "2018-08-14T10:39:55Z")

</div>

Try this… I’ve corrected your Python script as there was quite a lot of things in there that was not right…

[1(Corrected Python Script).dyn](https://forum.dynamobim.com/uploads/short-url/lgdeDJeVL0ydR2cmJAvG8QJusKC.dyn) (20.0 KB)

---

<div class="post-metadata">

**Author:** ![mohammadarslan](https://avatars.discourse-cdn.com/v4/letter/m/d07c76/32.png) [@mohammadarslan](https://forum.dynamobim.com/u/mohammadarslan)\
**Post date:** [August 14, 2018, 12:19pm UTC](https://forum.dynamobim.com/t/coloring-rooms-after-performing-matching-operation-on-lists/24805/3 "2018-08-14T12:19:51Z")

</div>

Thank you Jonathan 🙂  
But i am not getting anything by element.set parameter by name node. How can i visualize it ?

---

<div class="post-metadata">

**Author:** ![Jonathan.Olesen](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jonathan.olesen/32/44242_2.png) [@Jonathan.Olesen](https://forum.dynamobim.com/u/Jonathan.Olesen)\
**Post date:** [August 14, 2018, 12:48pm UTC](https://forum.dynamobim.com/t/coloring-rooms-after-performing-matching-operation-on-lists/24805/4 "2018-08-14T12:48:34Z")

</div>

Try and upload your .dyn and a stripped down .ret model and I’ll have a look, I do not think you’re actually passing room elements or controlling color using a simple parameter value 🙂

---

<div class="post-metadata">

**Author:** ![mohammadarslan](https://avatars.discourse-cdn.com/v4/letter/m/d07c76/32.png) [@mohammadarslan](https://forum.dynamobim.com/u/mohammadarslan)\
**Post date:** [August 14, 2018, 12:55pm UTC](https://forum.dynamobim.com/t/coloring-rooms-after-performing-matching-operation-on-lists/24805/5 "2018-08-14T12:55:36Z")

</div>

Please find attachments.

[Level 2.rvt](https://forum.dynamobim.com/uploads/short-url/yOU3rE9FcqZbmrHWL7q0biyWrtn.rvt) (3.9 MB)  
[1.dyn](https://forum.dynamobim.com/uploads/short-url/uggyBpHqzRVOBL9sMKulvbd5d5B.dyn) (20.1 KB)

---

<div class="post-metadata">

**Author:** ![Jonathan.Olesen](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jonathan.olesen/32/44242_2.png) [@Jonathan.Olesen](https://forum.dynamobim.com/u/Jonathan.Olesen)\
**Post date:** [August 14, 2018, 1:03pm UTC](https://forum.dynamobim.com/t/coloring-rooms-after-performing-matching-operation-on-lists/24805/6 "2018-08-14T13:03:21Z")

</div>

Sorry, I’m on Revit 2018.2 so I unfortunately cannot open your model ☹

---

<div class="post-metadata">

**Author:** ![mohammadarslan](https://avatars.discourse-cdn.com/v4/letter/m/d07c76/32.png) [@mohammadarslan](https://forum.dynamobim.com/u/mohammadarslan)\
**Post date:** [August 14, 2018, 1:08pm UTC](https://forum.dynamobim.com/t/coloring-rooms-after-performing-matching-operation-on-lists/24805/7 "2018-08-14T13:08:42Z")

</div>

I am using Revit sample project with the name of “ **rac\_basic\_sample\_project.rvt** ”. I think sample templates are the same in recent versions. Using this, I am taking floor level 2 in the active view.

File \> Open \> Sample files \> rac\_basic\_sample\_project

---

<div class="post-metadata">

**Author:** ![mohammadarslan](https://avatars.discourse-cdn.com/v4/letter/m/d07c76/32.png) [@mohammadarslan](https://forum.dynamobim.com/u/mohammadarslan)\
**Post date:** [August 14, 2018, 1:12pm UTC](https://forum.dynamobim.com/t/coloring-rooms-after-performing-matching-operation-on-lists/24805/8 "2018-08-14T13:12:34Z")

</div>

Excel file that i am using is this one. [Roomdata.xlsx](https://forum.dynamobim.com/uploads/short-url/tD3pumrwhICqF6zLYCoZy7V49u5.xlsx) (7.5 KB)

---

<div class="post-metadata">

**Author:** ![Jonathan.Olesen](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jonathan.olesen/32/44242_2.png) [@Jonathan.Olesen](https://forum.dynamobim.com/u/Jonathan.Olesen)\
**Post date:** [August 14, 2018, 1:47pm UTC](https://forum.dynamobim.com/t/coloring-rooms-after-performing-matching-operation-on-lists/24805/9 "2018-08-14T13:47:31Z")

</div>

I think you have to have a look at what you’re actually trying to change 😉

You want the color of the “rooms” to change… but you’re attempting to do this on the Room elements… but the information about the room color is not on there (you need to be able to do it in Revit to do it in Dynamo)…

The room color is controlled in the Color scheme…

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/e/7e67a5f0d874bea53a30d5fabb5ad805b3c3f529.png)

Which is a part of the graphics on the Floor Plan…  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/d/ed19aadc91e3d9050d093ef1ea6363774781d9a7.png)

It is here you really want to go…

Have a look at:

> [@Override colors of Rooms](https://forum.dynamobim.com/t/override-colors-of-rooms/24477):
>
> I’m trying to create a script to color rooms based on program area. And I noticed when it works, using the OverrideColorInView OOTB node, it changes the colors of the rooms globally. Oddly it seems to affect the color fill and interior fill colors. This seems to break the Color Schemes. Or rather, the Color schemes are applied to the view as the legend indicates, but the Rooms stay overridden with the Dynamo applied color. And I can’t seem to clear the color override.

> [@Set color on color scheme](https://forum.dynamobim.com/t/set-color-on-color-scheme/13762):
>
> Hi, My plan is to make a neutral color scheme for all rooms, setting all rooms to a color, solid fill, white. This would not change my plan view, but… Then set a few filters and set the override by room parameters, changing the color fill of the rooms. The goal here is to have a mix of two or three different color schemes in one view, you cannot do this in Revit, right?. How would i go about setting the color in the color scheme to begin with using Dynamo? And… would this work? Any advice…

> [@Change color fills for spaces from their parameter values](https://forum.dynamobim.com/t/change-color-fills-for-spaces-from-their-parameter-values/6449/2):
>
> I guess you could use some Element.GetParameterValueByName nodes (to read paramaters A and B) combined with some AND and NOT nodes to compile a new parameter (with Element.SetParameterByName) (e.g. strings called “red”, “green”…) to be used in the color scheme (in which you manually assign the correct color to the corresponding string). EDIT: I thought that using revit calculated parameters was quicker so I gave it a try but then I remembered that you cannot use those in Dynamo or in the color…

---

<div class="post-metadata">

**Author:** ![mohammadarslan](https://avatars.discourse-cdn.com/v4/letter/m/d07c76/32.png) [@mohammadarslan](https://forum.dynamobim.com/u/mohammadarslan)\
**Post date:** [August 14, 2018, 2:04pm UTC](https://forum.dynamobim.com/t/coloring-rooms-after-performing-matching-operation-on-lists/24805/10 "2018-08-14T14:04:11Z")

</div>

Thank you for your detailed reply. I am trying to understand 🙂 🙂
