# Novice User - First script not working

**URL:** <https://forum.dynamobim.com/t/novice-user-first-script-not-working/69727>\
**Category:** Revit\
**Created:** [October 27, 2021, 2:19pm UTC](https://forum.dynamobim.com/t/novice-user-first-script-not-working/69727 "2021-10-27T14:19:15Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![TPadayachee](https://avatars.discourse-cdn.com/v4/letter/t/fbc32d/32.png) [@TPadayachee](https://forum.dynamobim.com/u/TPadayachee)\
**Post date:** [October 27, 2021, 2:19pm UTC](https://forum.dynamobim.com/t/novice-user-first-script-not-working/69727/1 "2021-10-27T14:19:15Z")

</div>

All  
Please go easy on me as I have only started looking at Dynamo a few hours ago. I am trying to change Structural Material wording in my Str Steel Columns. The last 2 blocks don’t work. This is probably relatively easy for this group but please could someone tell me where I am going wrong and how I can fix the script?

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/6/96f078f6788bff737837594be8c9a5c0068332d5.jpeg)

---

<div class="post-metadata">

**Author:** ![aaronrumple](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/aaronrumple/32/195292_2.png) [@aaronrumple](https://forum.dynamobim.com/u/aaronrumple)\
**Post date:** [October 27, 2021, 2:25pm UTC](https://forum.dynamobim.com/t/novice-user-first-script-not-working/69727/2 "2021-10-27T14:25:11Z")

</div>

Well - you’re inputting a function into a string.  
If you open the little yellow note above your error - that will give you the traceback information and help in debugging.

---

<div class="post-metadata">

**Author:** ![bvs1982](https://avatars.discourse-cdn.com/v4/letter/b/43a26b/32.png) [@bvs1982](https://forum.dynamobim.com/u/bvs1982)\
**Post date:** [October 27, 2021, 2:25pm UTC](https://forum.dynamobim.com/t/novice-user-first-script-not-working/69727/3 "2021-10-27T14:25:57Z")

</div>

Screenshot is a bit hard to read because all the node titles are ‘missing’, but as far as i can tell  
you are not feeding the node correctly.

---

<div class="post-metadata">

**Author:** ![TPadayachee](https://avatars.discourse-cdn.com/v4/letter/t/fbc32d/32.png) [@TPadayachee](https://forum.dynamobim.com/u/TPadayachee)\
**Post date:** [October 27, 2021, 2:29pm UTC](https://forum.dynamobim.com/t/novice-user-first-script-not-working/69727/4 "2021-10-27T14:29:05Z")

</div>

![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/a/2ac3024e5608a58e1b1369dcff5315c103673ba9.jpeg)  
Hopefully that’s a bit clearer?

---

<div class="post-metadata">

**Author:** ![aaronrumple](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/aaronrumple/32/195292_2.png) [@aaronrumple](https://forum.dynamobim.com/u/aaronrumple)\
**Post date:** [October 27, 2021, 2:38pm UTC](https://forum.dynamobim.com/t/novice-user-first-script-not-working/69727/5 "2021-10-27T14:38:14Z")

</div>

String from object is not getting an object. Nor is that probably what you want to do.  
You’ll need to first filter the list of items to be changed using a FilterByBooleanMask based on your parameter criteria.  
Then just make the changes to the items in that list.

There really isn’t a search and replace in the way you are thinking about it.

Look around here and you’ll find plenty of good examples.

---

<div class="post-metadata">

**Author:** ![bvs1982](https://avatars.discourse-cdn.com/v4/letter/b/43a26b/32.png) [@bvs1982](https://forum.dynamobim.com/u/bvs1982)\
**Post date:** [October 27, 2021, 2:55pm UTC](https://forum.dynamobim.com/t/novice-user-first-script-not-working/69727/6 "2021-10-27T14:55:33Z")

</div>

Also worth noting that OP wants to replace a material (at least looks like it).  
That works a bit different then simply wiring the name of the material into  
the value of the _Element.SetParameterByName_ node.

---

<div class="post-metadata">

**Author:** ![bvs1982](https://avatars.discourse-cdn.com/v4/letter/b/43a26b/32.png) [@bvs1982](https://forum.dynamobim.com/u/bvs1982)\
**Post date:** [October 27, 2021, 3:02pm UTC](https://forum.dynamobim.com/t/novice-user-first-script-not-working/69727/7 "2021-10-27T15:02:05Z")

</div>

Here, this will get you started.

 ![DynamoBIM](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/2/92c5b437e1758f66c2ae9a70e72db02e286c3f41.png)  
[DynamoBIM.dyn](https://forum.dynamobim.com/uploads/short-url/vyCYROgZAs26gNK285vNkJQNVwC.dyn) (18.5 KB)

---

<div class="post-metadata">

**Author:** ![TPadayachee](https://avatars.discourse-cdn.com/v4/letter/t/fbc32d/32.png) [@TPadayachee](https://forum.dynamobim.com/u/TPadayachee)\
**Post date:** [October 27, 2021, 3:03pm UTC](https://forum.dynamobim.com/t/novice-user-first-script-not-working/69727/8 "2021-10-27T15:03:43Z")

</div>

Thank you, Much appreciated.
