Select Objects that Contain a Certain Material

Hi,

I am looking to select all of a certain glass type in my model and change the physical appearance of it in a 3d view. I would like to change the color of the glass to a red color to distinguish it from another type of glass. For simplicity sake, let’s say the glass material I want to change red is called “Glass” and the other type is just “Glass_2”. I’m assuming I want to select all items that have the glass material and then replace the glass with another material that shows up red in the view. Thanks for the assistance.

select all elements, query the material parameters, isolate the material you’re looking for, make whatever changes you want to the elements

start up a graph and show us what you come up with

1 Like

Here’s what I’ve started with. Ideally, I want to select all object with a certain material id (not sure how to do that), and I want to change the material to something different (or at least the graphic appearance of it). Sorry for the lean script…still finding my way around dynamo. Thanks!

Also, even just being able to select the elements that have that material in the revit model, and then going into the revit model and overriding elements in the model would also be a good solution. It doesn’t necessarily have to be a material change.

@freshprizz Why don’t you make a temporary edit to that material, by actually editing the material?

@Greg_McDowell is right: get the elements, find all parameters that are material parameters, check the material parameter’s value for the material that you are looking for, and set that the new value to that material.

You could also try this plugin that is specifically designed for this purpose:
https://apps.autodesk.com/RVT/en/Detail/Index?id=6565035931500761028&appLang=en&os=Win64