# How to get material layer of walls

**URL:** <https://forum.dynamobim.com/t/how-to-get-material-layer-of-walls/17048>\
**Category:** Revit\
**Tags:** revit, dynamo\
**Created:** [December 2, 2017, 7:19pm UTC](https://forum.dynamobim.com/t/how-to-get-material-layer-of-walls/17048 "2017-12-02T19:19:12Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![apikeairt](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/apikeairt/32/27089_2.png) [@apikeairt](https://forum.dynamobim.com/u/apikeairt)\
**Post date:** [December 2, 2017, 7:19pm UTC](https://forum.dynamobim.com/t/how-to-get-material-layer-of-walls/17048/1 "2017-12-02T19:19:12Z")

</div>

I want to get a materials layer each walls. However, I try to use “Element.GetMaterials” but this show it incorrect (in wall have a 3 layer). Then, I try to use “FamilyType.CompoundSturctureLayer”, a number of layer is correct but I can’t use “Material.StructureParameters” in after.

 ![Capture](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/3/b320c824aeb24de5731f15337ba14be9b5531507.JPG)

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [December 2, 2017, 9:44pm UTC](https://forum.dynamobim.com/t/how-to-get-material-layer-of-walls/17048/2 "2017-12-02T21:44:12Z")

</div>

It appears that you may have identified a bug, but I’m not sure if it’s with Dynamo or the clockwork node you’re utilizing. @Andreas_Dieckmann not sure if you’re aware of this or not. My test was on Revit 2017 with Dynamo 1.3.2.

 ![Capture](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/e/9e2a7f345507fa303f4558f53b8329fe34585717.png)

As you can see the results of the FamilyType.CompoundStructureLayers was an “Revit.Elements.UnknownElement” when it should be “Revit.Elements.Material” for the Material.StructuralParameters node to work. Attempting to reselect by ID returned the same results.

@apikeairt, you can either use the re-selection method I showed in your workspace, or you could create a new custom node based on the clockwork node to do this yourself.

---

<div class="post-metadata">

**Author:** ![Andreas\_Dieckmann](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/andreas_dieckmann/32/365_2.png) [@Andreas\_Dieckmann](https://forum.dynamobim.com/u/Andreas_Dieckmann)\
**Post date:** [December 2, 2017, 11:46pm UTC](https://forum.dynamobim.com/t/how-to-get-material-layer-of-walls/17048/3 "2017-12-02T23:46:08Z")

</div>

@jacob.small Thanks for letting me know. I don’t think there’s anything I can do about it - it looks like a bug in Dynamo’s auto-marshalling when passing Revit materials from a Python node back to Dynamo. I’ll file it nonetheless and take a look when time permits.

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [December 2, 2017, 11:50pm UTC](https://forum.dynamobim.com/t/how-to-get-material-layer-of-walls/17048/4 "2017-12-02T23:50:15Z")

</div>

Yeah after finishing another few items on my plate I dug into this further while debating what to have for dinner. There is already a GitHub issue for it so I’m guessing it will be fixed in a future release.  
[Material Nodes bug · Issue #1581 · DynamoDS/DynamoRevit · GitHub](https://github.com/DynamoDS/DynamoRevit/issues/1581).

---

<div class="post-metadata">

**Author:** ![apikeairt](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/apikeairt/32/27089_2.png) [@apikeairt](https://forum.dynamobim.com/u/apikeairt)\
**Post date:** [December 3, 2017, 6:13pm UTC](https://forum.dynamobim.com/t/how-to-get-material-layer-of-walls/17048/5 "2017-12-03T18:13:37Z")

</div>

Thank so much, I can do it already.

---

<div class="post-metadata">

**Author:** ![gregoriosaura](https://avatars.discourse-cdn.com/v4/letter/g/a9a28c/32.png) [@gregoriosaura](https://forum.dynamobim.com/u/gregoriosaura)\
**Post date:** [July 6, 2018, 8:01am UTC](https://forum.dynamobim.com/t/how-to-get-material-layer-of-walls/17048/6 "2018-07-06T08:01:04Z")

</div>

hi @jacob.small, I’ve tried your solutions, thanks for your work. I just have another question: I’m trying te get the “keynote” parameter from a material, but with the Material.StructuralParameters, I don’t get it. Do you know if I could look for it from another node?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [July 6, 2018, 2:29pm UTC](https://forum.dynamobim.com/t/how-to-get-material-layer-of-walls/17048/7 "2018-07-06T14:29:14Z")

</div>

Get the material element and then get its parameters with an element.parameter node.

If that doesn’t work, please start a new topic and post your current graph as a DYN and a detailed view of what you’ve tried that is failing, as this one is a bit old and already has a solution.

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [July 6, 2018, 2:29pm UTC](https://forum.dynamobim.com/t/how-to-get-material-layer-of-walls/17048/8 "2018-07-06T14:29:31Z")

</div>

Closed on July 6, 2018, 2:29pm UTC


