# Can dynamo fill in parameter values?

**URL:** <https://forum.dynamobim.com/t/can-dynamo-fill-in-parameter-values/9971>\
**Category:** Revit\
**Created:** [February 28, 2017, 5:59pm UTC](https://forum.dynamobim.com/t/can-dynamo-fill-in-parameter-values/9971 "2017-02-28T17:59:52Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![bharlow1986](https://avatars.discourse-cdn.com/v4/letter/b/8491ac/32.png) [@bharlow1986](https://forum.dynamobim.com/u/bharlow1986)\
**Post date:** [February 28, 2017, 5:59pm UTC](https://forum.dynamobim.com/t/can-dynamo-fill-in-parameter-values/9971/1 "2017-02-28T17:59:53Z")

</div>

I recently was able to get dynamo to select certain elements with a certain parameter. Is there a way to run dynamo to fill in the text value for that specific parameter? such as a different number value for each instance i have? if this is possible are we able to add a common prefix to all the numbers added? I have attached what i have so far. Thanks!

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

---

<div class="post-metadata">

**Author:** ![bmsewell](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/bmsewell/32/17073_2.png) [@bmsewell](https://forum.dynamobim.com/u/bmsewell)\
**Post date:** [February 28, 2017, 8:37pm UTC](https://forum.dynamobim.com/t/can-dynamo-fill-in-parameter-values/9971/2 "2017-02-28T20:37:52Z")

</div>

You can use the Element.SetParameterByName node to write a new value to that element.

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/6/467a88585740d30c4323e0833392bb71b82841c6.PNG)

---

<div class="post-metadata">

**Author:** ![bharlow1986](https://avatars.discourse-cdn.com/v4/letter/b/8491ac/32.png) [@bharlow1986](https://forum.dynamobim.com/u/bharlow1986)\
**Post date:** [March 1, 2017, 9:30pm UTC](https://forum.dynamobim.com/t/can-dynamo-fill-in-parameter-values/9971/3 "2017-03-01T21:30:10Z")

</div>

Wow @bmsewell u really simplified what i had. For some reason when i do the final connection it begins to process and then causes my dynamo and revit to crash. Can u explain the Prefix code block to me? when i input the “x” i get different options, should i select one of these?

---

<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:** [March 1, 2017, 10:16pm UTC](https://forum.dynamobim.com/t/can-dynamo-fill-in-parameter-values/9971/4 "2017-03-01T22:16:53Z")

</div>

THe prefix code block is inserting the string “Pre-Fab Box#” before the existing parameter value for “Pre-Fab Box#”.

Simplify it further by wiring the left most **All Elements of Category** node into the element input for the **ELement.SetParamterByName**.

How large is your dataset (number of electrical fixtures in this case)?

---

<div class="post-metadata">

**Author:** ![bharlow1986](https://avatars.discourse-cdn.com/v4/letter/b/8491ac/32.png) [@bharlow1986](https://forum.dynamobim.com/u/bharlow1986)\
**Post date:** [March 2, 2017, 2:54pm UTC](https://forum.dynamobim.com/t/can-dynamo-fill-in-parameter-values/9971/5 "2017-03-02T14:54:22Z")

</div>

Its very small, im using a test project with 25 electrical fixtures and only 13 have the “Pre-Fab Box#” parameter. I was hoping to get this working and be able to use it for a few hundred fixtures in an actual project. I cant figure out what dynamo doesnt like here to cause the crash. Could it be because the parameter is a created shared parameter?

---

<div class="post-metadata">

**Author:** ![bharlow1986](https://avatars.discourse-cdn.com/v4/letter/b/8491ac/32.png) [@bharlow1986](https://forum.dynamobim.com/u/bharlow1986)\
**Post date:** [March 2, 2017, 3:19pm UTC](https://forum.dynamobim.com/t/can-dynamo-fill-in-parameter-values/9971/6 "2017-03-02T15:19:13Z")

</div>

So i changed the run to manual and i have my prefixes working. Getting an error for the set parameter by name. It is saying no parameter found by that name.

---

<div class="post-metadata">

**Author:** ![bmsewell](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/bmsewell/32/17073_2.png) [@bmsewell](https://forum.dynamobim.com/u/bmsewell)\
**Post date:** [March 2, 2017, 3:24pm UTC](https://forum.dynamobim.com/t/can-dynamo-fill-in-parameter-values/9971/7 "2017-03-02T15:24:59Z")

</div>

Make sure the code block that contains the name of the parameter that you are trying to set matches exactly how it appears in Revit. It is case sensitive.

---

<div class="post-metadata">

**Author:** ![bharlow1986](https://avatars.discourse-cdn.com/v4/letter/b/8491ac/32.png) [@bharlow1986](https://forum.dynamobim.com/u/bharlow1986)\
**Post date:** [March 2, 2017, 3:32pm UTC](https://forum.dynamobim.com/t/can-dynamo-fill-in-parameter-values/9971/8 "2017-03-02T15:32:28Z")

</div>

Just verified that and it looks good. Could it be that i need to filter out the Electrical Fixtures that do not contain that parameter before connecting to the set parameter by name?

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/9/299e88ed7d5a8e8bfc305e1bca0c2a73290e6309.png)

---

<div class="post-metadata">

**Author:** ![bmsewell](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/bmsewell/32/17073_2.png) [@bmsewell](https://forum.dynamobim.com/u/bmsewell)\
**Post date:** [March 2, 2017, 3:33pm UTC](https://forum.dynamobim.com/t/can-dynamo-fill-in-parameter-values/9971/9 "2017-03-02T15:33:19Z")

</div>

Yes, that should work.

---

<div class="post-metadata">

**Author:** ![bharlow1986](https://avatars.discourse-cdn.com/v4/letter/b/8491ac/32.png) [@bharlow1986](https://forum.dynamobim.com/u/bharlow1986)\
**Post date:** [March 2, 2017, 4:07pm UTC](https://forum.dynamobim.com/t/can-dynamo-fill-in-parameter-values/9971/10 "2017-03-02T16:07:53Z")

</div>

Would i use a list clean somewhere?

---

<div class="post-metadata">

**Author:** ![bmsewell](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/bmsewell/32/17073_2.png) [@bmsewell](https://forum.dynamobim.com/u/bmsewell)\
**Post date:** [March 2, 2017, 4:46pm UTC](https://forum.dynamobim.com/t/can-dynamo-fill-in-parameter-values/9971/11 "2017-03-02T16:46:50Z")

</div>

You can filter the elements by the parameter value. Remove all elements from the list where the value is null.

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

---

<div class="post-metadata">

**Author:** ![bharlow1986](https://avatars.discourse-cdn.com/v4/letter/b/8491ac/32.png) [@bharlow1986](https://forum.dynamobim.com/u/bharlow1986)\
**Post date:** [March 2, 2017, 7:37pm UTC](https://forum.dynamobim.com/t/can-dynamo-fill-in-parameter-values/9971/12 "2017-03-02T19:37:05Z")

</div>

Hmm cant seem to get it to filter. Still seeing my null values for some reason.

---

<div class="post-metadata">

**Author:** ![m.ridi220](https://avatars.discourse-cdn.com/v4/letter/m/9d8465/32.png) [@m.ridi220](https://forum.dynamobim.com/u/m.ridi220)\
**Post date:** [September 2, 2019, 8:42am UTC](https://forum.dynamobim.com/t/can-dynamo-fill-in-parameter-values/9971/13 "2019-09-02T08:42:43Z")

</div>

> [@bharlow1986](#):
>
> You can use the Element.SetParameterByName node to write a new value to that element.

[write a parameter’s value.dyn](https://forum.dynamobim.com/uploads/short-url/iysdOcWwwmo7drJxFH7uG50OFMu.dyn) (15.8 KB)  
@bmsewell I copied your flow but I get the following error: “NO paramter founf by that name”. Can you help me please?
