With the reference to the previous post (
Comparing two lists and finding the common entries), 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.
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 (20.0 KB)
Thank you Jonathan
But i am not getting anything by element.set parameter by name node. How can i visualize it ?
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
Please find attachments.
Level 2.rvt (3.9 MB)
1.dyn (20.1 KB)
Sorry, I’m on Revit 2018.2 so I unfortunately cannot open your model
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
Excel file that i am using is this one.
Roomdata.xlsx (7.5 KB)
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…
Which is a part of the graphics on the Floor Plan…
It is here you really want to go…
Have a look at:
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.
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?
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).
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…
Thank you for your detailed reply. I am trying to understand