Matching Document Materials to each element instance

Hello everyone,

I’m having some trouble with matching a list of Materials to a list of elements with Revit inside Rhino through Grasshopper.


My goal is to enter a generic material/phrase e.g. “;Wood” or “?Concrete” to find all the element instances with the material applied.

I can’t search through Categories or Families as the data only shows up through Revit Material. I would manually cull the lists through GH but some of the RIR nodes require Filter Data components to work.

I know it has something to do with the depth of Materials within the Revit Data Structure but I can’t seem to figure a work around.

Any help would be greatly appreciated,
Thank you

Are you not missing a list of all your elements you want to match to? get your elements, find the material assigned to that element and then cycle through and do a simple tmatch? and cull.

I’m not sure how you would do this without going through the elements first. I would expect you could though, similarly to how a Multi-Category Material Schedule allows you to select elements.

Not seeing anything, I’ll ask around and get back to you when i find something.

Thanks for the responses.

I was trying to sort by material first, to avoid searching through the entire document just for computing power’s sake.

I found a way a couple ways to get the information but it’s not as clean as I’d like.
For reference I’m using Revit’s Sample File: rst_advanced_sample_project.


My thought process was

  1. Query the document for a certain material type (e.g. Timber, Structural Concrete) → show through an active viewpoint to visualise the identified components.

  2. Generate the list of elements containing that material type

  3. Gather component dimension data through the element id’s.

but it looks like the data structures have to be filtered through first, rather than broadly searched.

By approaching the document through materials first, I can eliminate a large chunk of data immediately.
With the built in categories query, I can pick the category specifically but I’m trying to capture half the documents categories in 1 universal query.

Materials information appears in both the type and element instance data. I’m hoping I can find a way to identify that, removing the chance of human error in forgetting to apply materials to components.

Data

It may not be possible, but I’ll update if I find a better work around.