# Set parameter by name doesn't work on instance parameters

**URL:** <https://forum.dynamobim.com/t/set-parameter-by-name-doesnt-work-on-instance-parameters/93453>\
**Category:** Revit\
**Tags:** revit, excel, dynamo\
**Created:** [September 4, 2023, 8:37am UTC](https://forum.dynamobim.com/t/set-parameter-by-name-doesnt-work-on-instance-parameters/93453 "2023-09-04T08:37:54Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![cozzalimatilde](https://avatars.discourse-cdn.com/v4/letter/c/df788c/32.png) [@cozzalimatilde](https://forum.dynamobim.com/u/cozzalimatilde)\
**Post date:** [September 4, 2023, 8:37am UTC](https://forum.dynamobim.com/t/set-parameter-by-name-doesnt-work-on-instance-parameters/93453/1 "2023-09-04T08:37:54Z")

</div>

Hi everyone, I’ trying to compile parameters from an excel file.  
I’ve obtained two lists from the sheet, one with the parameters names, and one with the parameters values.  
When i try to use Element.SetParameterByName I see that It works only for the type parameters, and gives me error for the instance ones, that actually are the ones I want to modify trough excel.  
Is there any solution? Do I have to use a different type of node?  
Be nice, I’m not an expert!

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/3/6/364ef24b9a86238281982bd54d85279e9612aa08.jpeg)  
the warning says that It can’t found any parameter with the given name, but I see that It can do that for the type parameters, and not for the instance

---

<div class="post-metadata">

**Author:** ![gideonkarthik](https://avatars.discourse-cdn.com/v4/letter/g/db5fbb/32.png) [@gideonkarthik](https://forum.dynamobim.com/u/gideonkarthik)\
**Post date:** [September 4, 2023, 9:09am UTC](https://forum.dynamobim.com/t/set-parameter-by-name-doesnt-work-on-instance-parameters/93453/2 "2023-09-04T09:09:35Z")

</div>

While working with text parameters (parameters with text as values), and when it is instance, then the values wont really update as given. we need to remove the existing values that appear in the list box at the instance parameter value area in properties box. let me try fixing this if you can give a rough version of your file.

---

<div class="post-metadata">

**Author:** ![cozzalimatilde](https://avatars.discourse-cdn.com/v4/letter/c/df788c/32.png) [@cozzalimatilde](https://forum.dynamobim.com/u/cozzalimatilde)\
**Post date:** [September 4, 2023, 9:18am UTC](https://forum.dynamobim.com/t/set-parameter-by-name-doesnt-work-on-instance-parameters/93453/3 "2023-09-04T09:18:40Z")

</div>

@gideonkarthik The problem is that the aim of this file is to have the chance to update parameters values directly form the excel file, without modifying them in revit, i don’t understand if you say that i should have an empty parameter to let the algorithm work, if yes, in this way it’s not what i want  
I give now you my file, thank you for now!  
[Da Excel a Revit.dyn](https://forum.dynamobim.com/uploads/short-url/7VieC1m7PUpfO3e2LfXAeSAQBxO.dyn) (43.6 KB)  
(You can see the instance values are “\_Codice”, “\_Edificio”, “\_Livello”, “\_Locale” etc…)

PS. Reading the two lists, the first two terms, 0 and 1, are not parameters that i want to modify, but i didn’t found a way to put them out of the list, i didn’t consider it a problem 'cause the parameter “3.2.1.A.A.1” doesn’t exist and I won’t modify “Tipo”'s value

---

<div class="post-metadata">

**Author:** ![l.dorrestijn](https://avatars.discourse-cdn.com/v4/letter/l/dc4da7/32.png) [@l.dorrestijn](https://forum.dynamobim.com/u/l.dorrestijn)\
**Post date:** [September 4, 2023, 9:40am UTC](https://forum.dynamobim.com/t/set-parameter-by-name-doesnt-work-on-instance-parameters/93453/4 "2023-09-04T09:40:35Z")

</div>

you are not feeding elements but a floor **type**. if you want to set the instance parameters, get all the floors first and filter out the specific floortype.

---

<div class="post-metadata">

**Author:** ![cozzalimatilde](https://avatars.discourse-cdn.com/v4/letter/c/df788c/32.png) [@cozzalimatilde](https://forum.dynamobim.com/u/cozzalimatilde)\
**Post date:** [September 4, 2023, 9:55am UTC](https://forum.dynamobim.com/t/set-parameter-by-name-doesnt-work-on-instance-parameters/93453/5 "2023-09-04T09:55:24Z")

</div>

@l.dorrestijn Thank you, I actually thought that that could be the problem, but the floor belongs to a system family and i didn’t find a way to select it differently, do you have any advice?  
I’ve tried this before, but in this case setparameterbyname didn’t find anything

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

---

<div class="post-metadata">

**Author:** ![l.dorrestijn](https://avatars.discourse-cdn.com/v4/letter/l/dc4da7/32.png) [@l.dorrestijn](https://forum.dynamobim.com/u/l.dorrestijn)\
**Post date:** [September 4, 2023, 10:09am UTC](https://forum.dynamobim.com/t/set-parameter-by-name-doesnt-work-on-instance-parameters/93453/6 "2023-09-04T10:09:30Z")

</div>

![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/1/d17cabf039b5bdc6da8ec6595250e65778f30050.png)  
this could be a solution

---

<div class="post-metadata">

**Author:** ![Marcel\_Rijsmus](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/marcel_rijsmus/32/8539_2.png) [@Marcel\_Rijsmus](https://forum.dynamobim.com/u/Marcel_Rijsmus)\
**Post date:** [September 4, 2023, 10:10am UTC](https://forum.dynamobim.com/t/set-parameter-by-name-doesnt-work-on-instance-parameters/93453/7 "2023-09-04T10:10:22Z")

</div>

![image (25)](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/2/42e6146842c1e91b49eef4cb4ebc963695351b1e.png)

---

<div class="post-metadata">

**Author:** ![cozzalimatilde](https://avatars.discourse-cdn.com/v4/letter/c/df788c/32.png) [@cozzalimatilde](https://forum.dynamobim.com/u/cozzalimatilde)\
**Post date:** [September 4, 2023, 10:17am UTC](https://forum.dynamobim.com/t/set-parameter-by-name-doesnt-work-on-instance-parameters/93453/8 "2023-09-04T10:17:07Z")

</div>

@Marcel_Rijsmus I didn’t link the filter with that node but with the list i created, i’ll try in this way but i don’t know if that’s the problem 'cause the filter works

---

<div class="post-metadata">

**Author:** ![Marcel\_Rijsmus](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/marcel_rijsmus/32/8539_2.png) [@Marcel\_Rijsmus](https://forum.dynamobim.com/u/Marcel_Rijsmus)\
**Post date:** [September 4, 2023, 10:26am UTC](https://forum.dynamobim.com/t/set-parameter-by-name-doesnt-work-on-instance-parameters/93453/9 "2023-09-04T10:26:08Z")

</div>

I would also skip the List.Create node

---

<div class="post-metadata">

**Author:** ![cozzalimatilde](https://avatars.discourse-cdn.com/v4/letter/c/df788c/32.png) [@cozzalimatilde](https://forum.dynamobim.com/u/cozzalimatilde)\
**Post date:** [September 4, 2023, 10:56am UTC](https://forum.dynamobim.com/t/set-parameter-by-name-doesnt-work-on-instance-parameters/93453/10 "2023-09-04T10:56:59Z")

</div>

@Marcel_Rijsmus @l.dorrestijn By using your advices i now can modify instance parameters, so thank you!  
Now i can’t modify type parameters but i’ll easily copy the algorithm by using the type as element and i’ll do the two things separately, 'cause i can’t link two elements to the node  
I’ll upload the algorithm in case this could be useful for someone else!

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/3/2/32bf23a7c6fd62939479d3bda4226ba3c4df167b.png)
