I’m new with dynamo and I have some doubts. I would like to know how can I override a material with a color in some views (not all). For example, I want to override all brick material with a solid red color.
I got it with “select model element”, but I want with materials. For example, brick = red, stone = blue, etc…
@jricardomiguel I was able to sort out what the material of each selected element by using a Boolean mask. As you can see, it built a list at the end, with the three walls being made of material “Concrete, Cast-in-Place”, and the SS-101/102 elements being made with material “Plywood, Sheathing”.
So, I have this wall with brick and two finishes. And I want that dynamo select automatically finishes with material “Plaster” (for example) and override with a color (red) and the second finish (for example wood) I want to override with another color (blue). And when the finish is stone override with green… etc. It’s possible?
I need this to do the plans of wall finishes… And I don’t want wall finishes by room, but yes by material.
So this is an interesting topic which I’m gonna cover in some depth because it interests me. Sooooooo… Get ready for a blog post sized of a response.
You haven’t selected the plaster, wood, or stone in Revit, you’ve selected a wall. As such you can’t easily override pieces of the wall as you’re asking. As far as I can tell, you can override the graphics for an entire element, a category, or groups of elements, but not a part of an element. So unless there is a feature that neither google, the forums, nor I are aware of, there is no way to override a portions of walls.
To summarize: Override an element? Check. Override a part of an element? Nope. If only you could create elements from the various layers of the walls, then you would be able to override them as you would any other element.
This is where the good news comes in.
You can quickly do this with the CREATE PARTS button in the modify tab. Once that is done you can use a filter by material in Revit - no dynamo needed. The three views below were created using only vanilla Revit - parts, modification of the view parameters, and view filters.
While we don’t need Dynamo to accomplish what you’re after, it still applies to as Dynamo is very useful in the overall workflow. Finding all the instances of the walls with a given material would likely take awhile for even the most seasoned Revit user, and would take some planning and careful consideration. And selecting all the NON highlighted parts, or setting up a REALLY elaborate filter or adding new parameters would be really difficult. With Dynamo you can:
Get all walls that make use of the material(s) in question (plaster, wood, stone)
Create parts from the layers of each of the walls
Exclude all parts not made of the desired material(s) so they don’t show up in other views
Aid in rapidly merging parts of the same material so that the plan graphics read correctly (even though the API doesn’t appear to allow access to this feature).
If I needed it tomorrow, I’d use a script and workflow like this:
It’s not perfect, but it’s good enough to share and for someone to run with. Clockwork, SteamNodes, Rhythm (and perhaps others) packages are in use so make sure you check those packages carefully if you can’t find something. I’m somewhat concerned as to why the Rhythm node is failing in my test project, but since it’s a zero touch node so I can’t really resolve the way I usually would with the time I have. If you’re concerned by this error when they try recreating the graph, I’d recommend they start another thread and linking back to here (and from here to there) in order to resolve it.
Lastly, if you’re curious, more information on parts can be found at the link below. They are really useful for bringing the OOTB Revit content to another level.
I make a script in dynamo to divide all walls in parts and after I create a filter by material and it’s done. For now works, but I would like to know (one day) if is possible to do this automatically with dynamo, like I want.
Are you sure parts aren’t being made? That looks like the spring nodes version which creates parts but I haven’t seen actually report the output correctly (it’s always null).Check if they are there (see the 3rd grey group from the left on how to do this sequentially). If that doesn’t work then try the node from the Rhythm package instead. If that still doesn’t work let us know.
Does it create the parts in the real project though? It may be that there are walls items which are being picked up by the walls category which are model in place elements or otherwise non-editable. Check for any parts in the real thing and let us know.
Filtering out for walls which don’t contain materials you want to highlight would also likely work as you don’t have plaster as a material on a curtain wall (in fact those walls don’t have any materials). Try rebuilding the graph I posted above node for node and see where it fails for you.