# What's wrong with Material.ByName

**URL:** <https://forum.dynamobim.com/t/whats-wrong-with-material-byname/8227>\
**Category:** Revit\
**Tags:** revit\
**Created:** [December 14, 2016, 9:17am UTC](https://forum.dynamobim.com/t/whats-wrong-with-material-byname/8227 "2016-12-14T09:17:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Xin\_Cheng](https://avatars.discourse-cdn.com/v4/letter/x/df705f/32.png) [@Xin\_Cheng](https://forum.dynamobim.com/u/Xin_Cheng)\
**Post date:** [December 14, 2016, 9:17am UTC](https://forum.dynamobim.com/t/whats-wrong-with-material-byname/8227/1 "2016-12-14T09:17:18Z")

</div>

i want create a material with a string, but got a error?  
what happened?

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

---

<div class="post-metadata">

**Author:** ![Mostafa\_El\_Ayoubi](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/mostafa_el_ayoubi/32/7815_2.png) [@Mostafa\_El\_Ayoubi](https://forum.dynamobim.com/u/Mostafa_El_Ayoubi)\
**Post date:** [December 14, 2016, 9:19am UTC](https://forum.dynamobim.com/t/whats-wrong-with-material-byname/8227/2 "2016-12-14T09:19:55Z")

</div>

What does the error say?

---

<div class="post-metadata">

**Author:** ![Xin\_Cheng](https://avatars.discourse-cdn.com/v4/letter/x/df705f/32.png) [@Xin\_Cheng](https://forum.dynamobim.com/u/Xin_Cheng)\
**Post date:** [December 14, 2016, 9:25am UTC](https://forum.dynamobim.com/t/whats-wrong-with-material-byname/8227/3 "2016-12-14T09:25:07Z")

</div>

it says material does not exist in this document

---

<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 14, 2016, 9:33am UTC](https://forum.dynamobim.com/t/whats-wrong-with-material-byname/8227/4 "2016-12-14T09:33:28Z")

</div>

It’s a selection node, not a creation node. There’s a node in Clockwork that lets you duplicate materials but it’s currently broken. The fixed version will be in the next release of Clockwork. If you need it urgently, you can get it here:

> <https://github.com/andydandy74/ClockworkForDynamo/blob/master/nodes/1.x/Material.Duplicate.dyf>

---

<div class="post-metadata">

**Author:** ![Xin\_Cheng](https://avatars.discourse-cdn.com/v4/letter/x/df705f/32.png) [@Xin\_Cheng](https://forum.dynamobim.com/u/Xin_Cheng)\
**Post date:** [December 14, 2016, 2:14pm UTC](https://forum.dynamobim.com/t/whats-wrong-with-material-byname/8227/5 "2016-12-14T14:14:25Z")

</div>

@Andreas_Dieckmann. thanks, Material.Duplicate is worked.  
Does it means there is no Node could create a material?

---

<div class="post-metadata">

**Author:** ![Mostafa\_El\_Ayoubi](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/mostafa_el_ayoubi/32/7815_2.png) [@Mostafa\_El\_Ayoubi](https://forum.dynamobim.com/u/Mostafa_El_Ayoubi)\
**Post date:** [December 14, 2016, 2:27pm UTC](https://forum.dynamobim.com/t/whats-wrong-with-material-byname/8227/6 "2016-12-14T14:27:49Z")

</div>

not ootb but the API exposes a method to do so

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/4/84c2ebf55143303e65fa397f7da20ddc75a01fec.png)
