Override Wall Cut Fill Pattern by Wall Type

I’m trying to color code the walls in plan based on their wall type. I’ve sorted the walls by element type and I’m trying to give all those elements a specific color using the color range. I’m unable to get all of the walls edited. It is only take the first index of each list. I’m assuming this is because of the value input into Color Range; however, I can not seem to get all the same type to have the same color. Any thoughts would be greatly appreciated.

Can’t remember how this node was built, but I think your lists may need to be of matching depths for the colors, patterns, and elements.

Try using liat.count and list.of repeated items on all lists to create matching sub lists, flatten them all, and set the lacing to shortest on the set color overide node.

Thanks for the suggestion. I realized using Color Range was not the right node for my specific application. I will never know the number of wall types so wanted to have a way to list several colors in the script that can be used… I ended up creating a list of colors and using the List.Drop Items combined with a count node to guarantee I had the same amount of lists. Then i flattened those lists and fed it into the override node set the lacing to shortest.

thanks again!

Hi ctriddell.
Your script is just what I need. I copied but unfortunately mine doesn’t work I can only override with a single color all the types. Instead one per type, Im using Dynamo 1.3 on Revit 2016 :frowning:

I ended up adjusting mine further to account for a randomization of colors… see if this will help. I tried in 2017 and works as expected.

Thanks again, but still don’t work for me, maybe I’m doing something wrong, I don’t have the knowledge to find the error.

Change the lacing to the Color By ARGB to Cross Product so you can get a lengthy list of colors. ( I did this because I never knew how many colors I would need and this helped to create that) Also its looking like currently you only have one wall type… Does your project have multiple and the script is not picking those up or does it only have the one?

I’m trying the script in a clean project with only three different type of walls to test it, I can override all the walls with a single color, but not the 3 types with different colors. I have several messages that dynamo is unstable, maybe the problem is on the packages I have installed. I will try in another computer.

Zoom in and post a camera export so we can read those nodes please. We are unable to see the big picture and provide best help without that.

1 Like