Override Color of Ceiling, based on Height Offset From Level in ascending order


I’m trying to create a .dyn which will override the color of a ceiling based on it’s height offset from level. I’m able to get this to work nicely, but the order in which the color is applied seems to be based on the element id ceiling element. So…I would like to sort the list of ceiling elements based on their heights in ascending order. That is where I am stuck. I’ve tried using sort.bykeylist without success, because I’m uncertain as to how it works. Thank you for your help.

Rob K.


Here’s two methods.2015-06-26_13h32_22

Hmmm, interesting; I had tried those nodes, but got an error. Are you using Dynamo 8.0 or 8.1? I will go back and try again and see if I missed something. Thank you for your help.

Yep, it was my error. In the SortByKey scenario, I connected the element input to the selected ceilings. I see that you left that input blank. This confuses me, but I’m guessing if you don’t connect elements to the Element.GetParameterValueByName, that it just passes a function onto the SortByKey node?

That’s what it seems like. Similar to a list.map node.

If you use the Math.Remap range node you don’t have to sort by key, I guess. something like this:


Is there a way to group the ceilings by level before adding the override?

And here is the workflow if your using Dynamo 0.9 Version.

1 Like


Vikram at its best

1 Like

Thanks KULKUL, but actually ORGANON’s approach would be more efficient in the first part of the graph.

I’ve just posted for some variety :slight_smile:

Is it possible to something very similar, but instead of height, color the ceilings by thickness? I can’t seem to query the Type property of the ceilings “Thickness”. I’d like to eventually color these based on a comparison to 2.5" thick.


Thanks for the help.

File: ColorByCeilingThickness.dyn



A post was split to a new topic: Generate color legend for ceiling heights