# Change material of wall with excel simultaneously

**URL:** <https://forum.dynamobim.com/t/change-material-of-wall-with-excel-simultaneously/22889>\
**Category:** Revit\
**Tags:** revit, excel, python, dynamo\
**Created:** [June 17, 2018, 9:58am UTC](https://forum.dynamobim.com/t/change-material-of-wall-with-excel-simultaneously/22889 "2018-06-17T09:58:19Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![mojtaba\_rezvani72](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@mojtaba\_rezvani72](https://forum.dynamobim.com/u/mojtaba_rezvani72)\
**Post date:** [June 17, 2018, 9:58am UTC](https://forum.dynamobim.com/t/change-material-of-wall-with-excel-simultaneously/22889/1 "2018-06-17T09:58:19Z")

</div>

hello  
I want to Export wall’s material to excel and then change them in Excel and simultneously import to revit and changed . in the following image the materials export to excel but when the material want to change it does not work. please say some soltion.

 ![change%20material](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/1/e1cbdbcafdcf09c8fed7186cbefc718df01c4da1.jpg)

---

<div class="post-metadata">

**Author:** ![mojtaba\_rezvani72](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@mojtaba\_rezvani72](https://forum.dynamobim.com/u/mojtaba_rezvani72)\
**Post date:** [June 17, 2018, 11:01am UTC](https://forum.dynamobim.com/t/change-material-of-wall-with-excel-simultaneously/22889/3 "2018-06-17T11:01:55Z")

</div>

thanks. exactly i dont know how can i index layer of material that exported in excel. also there is an error when i pload gragh file that it does not let me to upload that.

---

<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:** [June 17, 2018, 1:09pm UTC](https://forum.dynamobim.com/t/change-material-of-wall-with-excel-simultaneously/22889/4 "2018-06-17T13:09:26Z")

</div>

Pink nodes mean you’re missing a package. I believe you need clockwork installed.

---

<div class="post-metadata">

**Author:** ![mojtaba\_rezvani72](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@mojtaba\_rezvani72](https://forum.dynamobim.com/u/mojtaba_rezvani72)\
**Post date:** [June 17, 2018, 2:38pm UTC](https://forum.dynamobim.com/t/change-material-of-wall-with-excel-simultaneously/22889/5 "2018-06-17T14:38:39Z")

</div>

i have installed clockwork package but i don’t know what node must create to connect layerIndex in Familytype.setcompoundlayermaterial node.

---

<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:** [June 17, 2018, 3:09pm UTC](https://forum.dynamobim.com/t/change-material-of-wall-with-excel-simultaneously/22889/6 "2018-06-17T15:09:54Z")

</div>

Please send a link to your dyn.

---

<div class="post-metadata">

**Author:** ![mojtaba\_rezvani72](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@mojtaba\_rezvani72](https://forum.dynamobim.com/u/mojtaba_rezvani72)\
**Post date:** [June 17, 2018, 3:18pm UTC](https://forum.dynamobim.com/t/change-material-of-wall-with-excel-simultaneously/22889/7 "2018-06-17T15:18:50Z")

</div>

Many many thanks. [Link](http://s8.picofile.com/file/8329425718/Change_Material.dyn.html)

---

<div class="post-metadata">

**Author:** ![mojtaba\_rezvani72](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@mojtaba\_rezvani72](https://forum.dynamobim.com/u/mojtaba_rezvani72)\
**Post date:** [June 20, 2018, 7:36am UTC](https://forum.dynamobim.com/t/change-material-of-wall-with-excel-simultaneously/22889/9 "2018-06-20T07:36:19Z")

</div>

thanks for your response but i want when I change material in excel it changes in revit automatically. for example when i change Glass instead of Batt Insulation in excel it apply in revit and Changed.  
I run your graph but it doesn’t work  
 ![Change%20material1](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/0/903ad83ca939a8f66054664f94496c97581cf477.jpg)

---

<div class="post-metadata">

**Author:** ![mojtaba\_rezvani72](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@mojtaba\_rezvani72](https://forum.dynamobim.com/u/mojtaba_rezvani72)\
**Post date:** [June 20, 2018, 12:55pm UTC](https://forum.dynamobim.com/t/change-material-of-wall-with-excel-simultaneously/22889/11 "2018-06-20T12:55:43Z")

</div>

could you draw this graph or which node that i use? because i couldn’t understand it clearly.

---

<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:** [June 20, 2018, 1:53pm UTC](https://forum.dynamobim.com/t/change-material-of-wall-with-excel-simultaneously/22889/12 "2018-06-20T13:53:57Z")

</div>

Can you show what you have attempted? The purpose of the forums is to help you learn and it’s hard to do that without knowing where you’re getting stuck.

---

<div class="post-metadata">

**Author:** ![mojtaba\_rezvani72](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@mojtaba\_rezvani72](https://forum.dynamobim.com/u/mojtaba_rezvani72)\
**Post date:** [June 20, 2018, 2:16pm UTC](https://forum.dynamobim.com/t/change-material-of-wall-with-excel-simultaneously/22889/13 "2018-06-20T14:16:23Z")

</div>

Dear JacobSmall  
in the following image i have shown what i’m looking for

 ![Change%20material](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/8/58d96690c812ad51f7438770af42dd1a54ee025c.jpg)  
if you help me i would thank you.

---

<div class="post-metadata">

**Author:** ![Jonathan.Olesen](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jonathan.olesen/32/44242_2.png) [@Jonathan.Olesen](https://forum.dynamobim.com/u/Jonathan.Olesen)\
**Post date:** [June 20, 2018, 2:24pm UTC](https://forum.dynamobim.com/t/change-material-of-wall-with-excel-simultaneously/22889/14 "2018-06-20T14:24:26Z")

</div>

Hi @mojtaba_rezvani72 I think you should really read this post. And read it thoroughly:

[https://forum.dynamobim.com/t/how-to-get-help-on-the-dynamo-forums/4677](https://forum.dynamobim.com/t/how-to-get-help-on-the-dynamo-forums/4677)

Especially Point 7 is key.

---

<div class="post-metadata">

**Author:** ![mojtaba\_rezvani72](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@mojtaba\_rezvani72](https://forum.dynamobim.com/u/mojtaba_rezvani72)\
**Post date:** [June 20, 2018, 2:29pm UTC](https://forum.dynamobim.com/t/change-material-of-wall-with-excel-simultaneously/22889/15 "2018-06-20T14:29:35Z")

</div>

I know, but I really got stuck in this case.

---

<div class="post-metadata">

**Author:** ![Jonathan.Olesen](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jonathan.olesen/32/44242_2.png) [@Jonathan.Olesen](https://forum.dynamobim.com/u/Jonathan.Olesen)\
**Post date:** [June 20, 2018, 2:57pm UTC](https://forum.dynamobim.com/t/change-material-of-wall-with-excel-simultaneously/22889/16 "2018-06-20T14:57:03Z")

</div>

But it seems you have not even tried yet if the sketch is all you have

---

<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:** [June 20, 2018, 7:34pm UTC](https://forum.dynamobim.com/t/change-material-of-wall-with-excel-simultaneously/22889/17 "2018-06-20T19:34:42Z")

</div>

@mojtaba_rezvani72 - the graph which @erfajo built up above should do this. Rebuild it and let us know where you get stuck.

---

<div class="post-metadata">

**Author:** ![mojtaba\_rezvani72](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@mojtaba\_rezvani72](https://forum.dynamobim.com/u/mojtaba_rezvani72)\
**Post date:** [June 22, 2018, 9:34am UTC](https://forum.dynamobim.com/t/change-material-of-wall-with-excel-simultaneously/22889/18 "2018-06-22T09:34:04Z")

</div>

as you see in the following image i try it but this gragh doesn’t work and some list is empty or null.

 ![Change%20material1](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/0/903ad83ca939a8f66054664f94496c97581cf477.jpg)

---

<div class="post-metadata">

**Author:** ![Jonathan.Olesen](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jonathan.olesen/32/44242_2.png) [@Jonathan.Olesen](https://forum.dynamobim.com/u/Jonathan.Olesen)\
**Post date:** [June 22, 2018, 9:57am UTC](https://forum.dynamobim.com/t/change-material-of-wall-with-excel-simultaneously/22889/19 "2018-06-22T09:57:30Z")

</div>

Can you enable previews of the codeblock?

---

<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:** [June 22, 2018, 10:17am UTC](https://forum.dynamobim.com/t/change-material-of-wall-with-excel-simultaneously/22889/20 "2018-06-22T10:17:49Z")

</div>

Try running this in 1.3.2 instead. May be that the clockwork node in question needs an update.

---

<div class="post-metadata">

**Author:** ![mojtaba\_rezvani72](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@mojtaba\_rezvani72](https://forum.dynamobim.com/u/mojtaba_rezvani72)\
**Post date:** [June 23, 2018, 8:03am UTC](https://forum.dynamobim.com/t/change-material-of-wall-with-excel-simultaneously/22889/23 "2018-06-23T08:03:20Z")

</div>

as you see in the following images, I have exported materials of Wall Category in Excel and then change material in excel then imported by Data.ImportExcel node.  
the question are: 1. According to this graph, only the material of a wall changes, how can we change the material of other walls?  
2. According to this graph, we need to determine the LayerIndex (in FamilyType.SetCompoundLayerMaterial node) of wall’s matterial by Code Block node, there is a way that the LayerIndex can be automatically read according to the cell that changes in Excel.

 ![change%20material%20by%20excel%201](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/3/f/3fce521e4173d413ce82927844f3ca9f00eee53e.jpg)  
 ![change%20material%20by%20excel%202](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/b/db0adc93a71152e7305c6c3b7dd169ce701d4269.jpg)  
 ![change%20material%20by%20excel%203](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/9/09805bca4eb22a90d6d26d592753c712d69623fb.jpg)

---

<div class="post-metadata">

**Author:** ![jan.appelgryn](https://avatars.discourse-cdn.com/v4/letter/j/ba9def/32.png) [@jan.appelgryn](https://forum.dynamobim.com/u/jan.appelgryn)\
**Post date:** [January 1, 2021, 7:00pm UTC](https://forum.dynamobim.com/t/change-material-of-wall-with-excel-simultaneously/22889/24 "2021-01-01T19:00:06Z")

</div>

Thanks for this Script.

---

<div class="post-metadata">

**Author:** ![jan.appelgryn](https://avatars.discourse-cdn.com/v4/letter/j/ba9def/32.png) [@jan.appelgryn](https://forum.dynamobim.com/u/jan.appelgryn)\
**Post date:** [January 1, 2021, 7:32pm UTC](https://forum.dynamobim.com/t/change-material-of-wall-with-excel-simultaneously/22889/25 "2021-01-01T19:32:38Z")

</div>

I have used a couple of scripts to do a repetitive change on 22 models, thanks for the info.[RHD-DYN-REV-RedSea\_Wall\_Floor Changes.dyn](https://forum.dynamobim.com/uploads/short-url/gOmlK48ZL8efwdSfbZCr0pE6bbo.dyn) (97.8 KB)
