# Creating more than 1 material... What am I doing wrong?

**URL:** <https://forum.dynamobim.com/t/creating-more-than-1-material-what-am-i-doing-wrong/93534>\
**Category:** Revit\
**Created:** [September 6, 2023, 2:38pm UTC](https://forum.dynamobim.com/t/creating-more-than-1-material-what-am-i-doing-wrong/93534 "2023-09-06T14:38:21Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alien](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alien/32/40701_2.png) [@Alien](https://forum.dynamobim.com/u/Alien)\
**Post date:** [September 6, 2023, 2:38pm UTC](https://forum.dynamobim.com/t/creating-more-than-1-material-what-am-i-doing-wrong/93534/1 "2023-09-06T14:38:21Z")

</div>

![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/d/adc19f67d7d156b92f606b6c389fc75bcbfb7291.png)

How come it’s only creating one material, not two?

---

<div class="post-metadata">

**Author:** ![Alban\_de\_Chasteigner](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alban_de_chasteigner/32/39650_2.png) [@Alban\_de\_Chasteigner](https://forum.dynamobim.com/u/Alban_de_Chasteigner)\
**Post date:** [September 6, 2023, 2:59pm UTC](https://forum.dynamobim.com/t/creating-more-than-1-material-what-am-i-doing-wrong/93534/2 "2023-09-06T14:59:52Z")

</div>

Hi @Alien,

The lists of inputs have unequal length (null and lists of data) so use the longest lacing on the _Material Create_ node.

---

<div class="post-metadata">

**Author:** ![Alien](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alien/32/40701_2.png) [@Alien](https://forum.dynamobim.com/u/Alien)\
**Post date:** [September 6, 2023, 3:06pm UTC](https://forum.dynamobim.com/t/creating-more-than-1-material-what-am-i-doing-wrong/93534/3 "2023-09-06T15:06:14Z")

</div>

Ah thanks, why didn’t that ocour to me!

I knew that was the problem… but did it in python like an idiot.

Your solution makes way more sense 😃

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/f/9f67d6b9a21721106ea69295cceb25fce9cbdc16.png)

---

<div class="post-metadata">

**Author:** ![Alien](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alien/32/40701_2.png) [@Alien](https://forum.dynamobim.com/u/Alien)\
**Post date:** [September 6, 2023, 3:09pm UTC](https://forum.dynamobim.com/t/creating-more-than-1-material-what-am-i-doing-wrong/93534/4 "2023-09-06T15:09:40Z")

</div>

It’d be nice to have the option to overwrite or not in that node. 🙂

---

<div class="post-metadata">

**Author:** ![Alban\_de\_Chasteigner](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alban_de_chasteigner/32/39650_2.png) [@Alban\_de\_Chasteigner](https://forum.dynamobim.com/u/Alban_de_Chasteigner)\
**Post date:** [September 6, 2023, 3:13pm UTC](https://forum.dynamobim.com/t/creating-more-than-1-material-what-am-i-doing-wrong/93534/5 "2023-09-06T15:13:52Z")

</div>

The custom node can already overwrite properties of existing materials :

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/3/83787938b20602de17745bed07e402dbf6ac97a0.png)

---

<div class="post-metadata">

**Author:** ![Alien](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alien/32/40701_2.png) [@Alien](https://forum.dynamobim.com/u/Alien)\
**Post date:** [September 6, 2023, 3:14pm UTC](https://forum.dynamobim.com/t/creating-more-than-1-material-what-am-i-doing-wrong/93534/6 "2023-09-06T15:14:51Z")

</div>

I know. I’m suggesting it’d be nice to have the option NOT to overwrite.

---

<div class="post-metadata">

**Author:** ![staylor](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/staylor/32/94307_2.png) [@staylor](https://forum.dynamobim.com/u/staylor)\
**Post date:** [September 6, 2023, 5:50pm UTC](https://forum.dynamobim.com/t/creating-more-than-1-material-what-am-i-doing-wrong/93534/7 "2023-09-06T17:50:36Z")

</div>

You could compare your list of material names against the names of all existing materials and filter the matching ones out prior to feeding into the Material Create node. Or you could copy the code and create your own custom node and either remove the section of code that @Alban_de_Chasteigner shows in his clip or take it a step further and modify the code and have that part only run based on true being inputted in. This will give you the option to overwrite existing or not.

---

<div class="post-metadata">

**Author:** ![Alien](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alien/32/40701_2.png) [@Alien](https://forum.dynamobim.com/u/Alien)\
**Post date:** [September 6, 2023, 5:55pm UTC](https://forum.dynamobim.com/t/creating-more-than-1-material-what-am-i-doing-wrong/93534/8 "2023-09-06T17:55:53Z")

</div>

I did both…  
But I was suggesting it’d be a cool upgrade for the node 🙂

---

<div class="post-metadata">

**Author:** ![staylor](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/staylor/32/94307_2.png) [@staylor](https://forum.dynamobim.com/u/staylor)\
**Post date:** [September 6, 2023, 5:58pm UTC](https://forum.dynamobim.com/t/creating-more-than-1-material-what-am-i-doing-wrong/93534/9 "2023-09-06T17:58:09Z")

</div>

Gotcha!
