Element ID from Material


Is there any way to get ElementID from material? I mean that I want to get the Element(s) ID which is used in the material?

And also I want to get the name of the material from material ID. Is it possible to add material name properties to the custom node “Material Properties”? (note: I don’t know how to write custom node)

Ekran Alıntısı





Waiting for your advices…Thanks



A material is just another element. Use the built-in node Element.Id, alternatively Element.ID (pkg Clockwork) or Element Ids (pkg archi-lab.net). Same thing with getting the name: the built-in node Element.Name should work just fine. BTW: For layered objects like walls you can also use the node FamilyType.CompoundStructureLayers (also pkg Clockwork) as it will retrieve some more material layer related information for you.


Hi Andreas, Thank you for your advices.

it solved the Material name problem but i think i couldn’t explain the main question. Let me try again;

For example i used the “Carpet” material for 3 walls. When i give the name or ID of material (“Carpet”), can dynamo return the value of Walls (Element) ID? Actually the opposite of the application in picture?



I don’t think there is a way to do that unless you are willing to iterate through all elements in the model and checking each one for material properties. It might not be a great idea but it has been done before: http://thebuildingcoder.typepad.com/blog/2012/01/materials-collection-and-filtering.html