So I’d like to be able to assign colour to any Revit elements by depending on the value of the parameter assigned to the element. The value of the parameter would be a text type.
For eg: very high-red colour,
high-orange colour.
It’ll be a shared parameter named “Level of Risk”
Basically, the idea is to be able to visualise the risk level in the model depending on the level of risk assigned to the model element.
Would appreciate any help on this.
Hi @Becky,
Welcome to the Dynamo community.
You can create a dictionary and then use it to find which color needs to be applied to the element based on its Shared Parameter Value.
Hey! @AmolShah
Thanks a lot. This is so helpful. It sounds silly but the elements can be selected from any view right? Idk why i’m unable to select the elements. If i’m doing something wrong. Apart from this I think it’s gonna work perfectly fine.
I have another question. To add a step before this current solution, I’d like to create a list of shared parameters to avoid creating and assigning manually, by importing it from excel and from among these is the one parameter i.e., the “Level of Risk” to which I want to assign the colour (Same as the one that’s already one). Would appreciate your input on this as well.
Btw, a more dynamic approach in my opinion would be to ask Dynamo to create view filters so that you don’t have to run the graph over and over again. RiskLevelFilter.dyn (58.6 KB)
Ah! I hadn’t thought of that. This is a way better approach. Will probably go for this one. Can’t thank you enough for all the help. Thanks a million
Cheers!