# Element.SetParameterByName isn't working correctly

**URL:** https://forum.dynamobim.com/t/element-setparameterbyname-isnt-working-correctly/105861
**Category:** Revit
**Created:** [November 15, 2024, 8:30am UTC](https://forum.dynamobim.com/t/element-setparameterbyname-isnt-working-correctly/105861 "2024-11-15T08:30:58Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![LZDXK](https://avatars.discourse-cdn.com/v4/letter/l/bbe5ce/32.png) [@LZDXK](https://forum.dynamobim.com/u/LZDXK)
#### Post date: [November 15, 2024, 8:30am UTC](https://forum.dynamobim.com/t/element-setparameterbyname-isnt-working-correctly/105861/1 "2024-11-15T08:30:58Z")

</div>

Hi, I am trying to enter parameters from another family into another family, both have the same parameters, but the transfer only works for comments, for example, but not for any with a number value.

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

---

<div class="post-metadata">

### Author: ![jmark](https://avatars.discourse-cdn.com/v4/letter/j/e0b2c6/32.png) [@jmark](https://forum.dynamobim.com/u/jmark)
#### Post date: [November 15, 2024, 9:35am UTC](https://forum.dynamobim.com/t/element-setparameterbyname-isnt-working-correctly/105861/2 "2024-11-15T09:35:08Z")

</div>

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

there’s no parameter and value to put

---

<div class="post-metadata">

### Author: ![LZDXK](https://avatars.discourse-cdn.com/v4/letter/l/bbe5ce/32.png) [@LZDXK](https://forum.dynamobim.com/u/LZDXK)
#### Post date: [November 15, 2024, 9:51am UTC](https://forum.dynamobim.com/t/element-setparameterbyname-isnt-working-correctly/105861/3 "2024-11-15T09:51:17Z")

</div>

parameter and value are set in list.combine because I have list of multiple parameters and values.

If I do it the way you have written, I get the following error message:  
Warning: Element.SetParameterByName operation failed.  
The parameter’s storage type is not a string

---

<div class="post-metadata">

### Author: ![jmark](https://avatars.discourse-cdn.com/v4/letter/j/e0b2c6/32.png) [@jmark](https://forum.dynamobim.com/u/jmark)
#### Post date: [November 15, 2024, 10:08am UTC](https://forum.dynamobim.com/t/element-setparameterbyname-isnt-working-correctly/105861/4 "2024-11-15T10:08:45Z")

</div>

then you need to check the storage type of that parameter and match it.

even then, that input shouldn’t be left blank

---

<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: [November 15, 2024, 1:54pm UTC](https://forum.dynamobim.com/t/element-setparameterbyname-isnt-working-correctly/105861/5 "2024-11-15T13:54:58Z")

</div>

It would work better if you use a python script and create the code in python. That way you can get the source parameter names, storage types and if they have a value and assign the values out to the target element accordingly.

Or at the very least, create a list of all the parameter names that you want to copy the values of and use the rhythm get and set parameter nodes.
