# Multiple inputs for the node Element.SetParameterByName

**URL:** <https://forum.dynamobim.com/t/multiple-inputs-for-the-node-element-setparameterbyname/15108>\
**Category:** Revit\
**Tags:** revit\
**Created:** [September 26, 2017, 9:55am UTC](https://forum.dynamobim.com/t/multiple-inputs-for-the-node-element-setparameterbyname/15108 "2017-09-26T09:55:27Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![alex.berg](https://avatars.discourse-cdn.com/v4/letter/a/b782af/32.png) [@alex.berg](https://forum.dynamobim.com/u/alex.berg)\
**Post date:** [September 26, 2017, 9:55am UTC](https://forum.dynamobim.com/t/multiple-inputs-for-the-node-element-setparameterbyname/15108/1 "2017-09-26T09:55:27Z")

</div>

Hi everyone,

Long story short. I have 4 generic models with 2 parameters: A and B to which I need to assign values.  
 ![test](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/0/d07d0ffeeae07b67947e2bb6a6e676800ba8e2c9.png)

The issue is with the node Element.SetParameterByName when i try to plug all of it in, it’s starts thinking indefinitely. I can manually plug a couple of the nodes but the input of elements is variable so this is not an option. Can anyone help with this? A different approach would be good as well, as longs as it works with N-amount of inputs.

![Capture](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/4/d42d9f4b4ffd01e5a1ce8fe828da6ae7070e3a4e.png)

[test.dyn](https://forum.dynamobim.com/uploads/short-url/lPz4J4ZAlD2h9SvA3jHHniiKIuP.dyn) (2.7 KB)  
[test.rfa](https://forum.dynamobim.com/uploads/short-url/bLsbZiTIPMX8svJWuXzyPXBoPqI.rfa) (332 KB)

---

<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:** [September 26, 2017, 10:50am UTC](https://forum.dynamobim.com/t/multiple-inputs-for-the-node-element-setparameterbyname/15108/2 "2017-09-26T10:50:56Z")

</div>

Have you tried to use one set parameter by name for “a” and all of its values, and one for b and all of its values?

---

<div class="post-metadata">

**Author:** ![alex.berg](https://avatars.discourse-cdn.com/v4/letter/a/b782af/32.png) [@alex.berg](https://forum.dynamobim.com/u/alex.berg)\
**Post date:** [September 26, 2017, 11:08am UTC](https://forum.dynamobim.com/t/multiple-inputs-for-the-node-element-setparameterbyname/15108/3 "2017-09-26T11:08:01Z")

</div>

I feel stupid… I does work but for this i have to have curtain number op parameters, but i actually ca have more parameters depending on the family i’m using. So I still need a way to do it though one node.

![Capture](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/1/c14cf510fca47a32568326caffa1044e06685bd9.PNG)

---

<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:** [September 26, 2017, 11:37am UTC](https://forum.dynamobim.com/t/multiple-inputs-for-the-node-element-setparameterbyname/15108/4 "2017-09-26T11:37:30Z")

</div>

List at level functions. 🙂

---

<div class="post-metadata">

**Author:** ![alex.berg](https://avatars.discourse-cdn.com/v4/letter/a/b782af/32.png) [@alex.berg](https://forum.dynamobim.com/u/alex.berg)\
**Post date:** [September 26, 2017, 12:07pm UTC](https://forum.dynamobim.com/t/multiple-inputs-for-the-node-element-setparameterbyname/15108/5 "2017-09-26T12:07:45Z")

</div>

What do you mean exactly?

---

<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:** [September 26, 2017, 12:15pm UTC](https://forum.dynamobim.com/t/multiple-inputs-for-the-node-element-setparameterbyname/15108/6 "2017-09-26T12:15:46Z")

</div>

This should work:

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

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [September 26, 2017, 1:05pm UTC](https://forum.dynamobim.com/t/multiple-inputs-for-the-node-element-setparameterbyname/15108/7 "2017-09-26T13:05:03Z")

</div>

When in doubt I always make my lists line up 1-to-1. In this case, cycle your elements so you have one element per parameter/value instead of one element with a list of two parameters/values. Then you never have to worry about list structure, levels, lacing, etc.

---

<div class="post-metadata">

**Author:** ![alex.berg](https://avatars.discourse-cdn.com/v4/letter/a/b782af/32.png) [@alex.berg](https://forum.dynamobim.com/u/alex.berg)\
**Post date:** [September 26, 2017, 1:21pm UTC](https://forum.dynamobim.com/t/multiple-inputs-for-the-node-element-setparameterbyname/15108/8 "2017-09-26T13:21:43Z")

</div>

@Mostafa_El_Ayoubi

Doen’s this mean that i have to set the level value every time? If i have n-th parameters which corresponds to n-th level?

@Nick_Boyts  
Hmmm… Maybe… I need to think how exactly but maybe indeed…

---

<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:** [September 26, 2017, 1:36pm UTC](https://forum.dynamobim.com/t/multiple-inputs-for-the-node-element-setparameterbyname/15108/9 "2017-09-26T13:36:41Z")

</div>

> [@alex.berg](#):
>
> Doen’s this mean that i have to set the level value every time? If i have n-th parameters which corresponds to n-th level?

No, but it means that you need to have depth of parameter value for each parameter.

Out of curiosity, do the parameter values lead to a change in model geometry on the job where things were locking up?

---

<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 26, 2017, 2:29pm UTC](https://forum.dynamobim.com/t/multiple-inputs-for-the-node-element-setparameterbyname/15108/10 "2017-09-26T14:29:43Z")

</div>

Hi @alex.berg

This is my way of doing this

![image](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/3X/8/a/8a1993176edf89158e8952caabd9195285398861.png)

The code is generated in excel with his file.  
Just fill in the columns in excel, then copy and paste in the Code Block

[designscript\_generator.xlsx](https://forum.dynamobim.com/uploads/short-url/k7cbRHn95pITeULNmZjamC2ZBI2.xlsx) (13.2 KB)

Marcel

---

<div class="post-metadata">

**Author:** ![alex.berg](https://avatars.discourse-cdn.com/v4/letter/a/b782af/32.png) [@alex.berg](https://forum.dynamobim.com/u/alex.berg)\
**Post date:** [September 26, 2017, 2:39pm UTC](https://forum.dynamobim.com/t/multiple-inputs-for-the-node-element-setparameterbyname/15108/11 "2017-09-26T14:39:20Z")

</div>

So the level of the parameter value has to be different every time, correct?

The point is that i have a set of elements one after each other the height of which is determent by an variable f(x). I get an input of heights that i need to apply to them. But the thing is that this elements can change in all 3 dimensions… It’s now only 2.

![Untitled](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/5/f589fbcf4d6a875a46dc6d33985fa313e94b1d7d.png)

---

<div class="post-metadata">

**Author:** ![alex.berg](https://avatars.discourse-cdn.com/v4/letter/a/b782af/32.png) [@alex.berg](https://forum.dynamobim.com/u/alex.berg)\
**Post date:** [September 26, 2017, 2:42pm UTC](https://forum.dynamobim.com/t/multiple-inputs-for-the-node-element-setparameterbyname/15108/12 "2017-09-26T14:42:00Z")

</div>

Wow… I’ll give it a try but i’m unfortunately working with extremely long or big constructions so the list can get way to big for me… But anyways thanks!

---

<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 26, 2017, 5:48pm UTC](https://forum.dynamobim.com/t/multiple-inputs-for-the-node-element-setparameterbyname/15108/13 "2017-09-26T17:48:59Z")

</div>

@Alex

If you can generate the values in excel by a formula then it gets a lot simpler.

1. export all generics with the parameters AND the UniqueId to excel
2. do your magic in excel
3. import the values in using the UniqueId as key to set it to the correct instance.

Marcel

---

<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:** [September 26, 2017, 8:00pm UTC](https://forum.dynamobim.com/t/multiple-inputs-for-the-node-element-setparameterbyname/15108/14 "2017-09-26T20:00:40Z")

</div>

If  
The parameters are always two levels deep.  
And the list of elements is always 3 levels deep.  
And the list of values is always 3 levels deep.  
Then this level structure should always work, even if you have 4000 parameters you are setting.

Side note: I have great sympathy for the man with 4000 parameters to set.

Length of the lists doesn’t matter; it’s about the way the data is organized. 😃

---

<div class="post-metadata">

**Author:** ![alex.berg](https://avatars.discourse-cdn.com/v4/letter/a/b782af/32.png) [@alex.berg](https://forum.dynamobim.com/u/alex.berg)\
**Post date:** [September 27, 2017, 7:38am UTC](https://forum.dynamobim.com/t/multiple-inputs-for-the-node-element-setparameterbyname/15108/16 "2017-09-27T07:38:07Z")

</div>

I feel really stupid because i have a hard time imaging how this leveling actually works… But I do belief you. But i don’t understand. But still belief you. I’m dumb.

@Marcel_Rijsmus  
I wil look in to it. Thanks!

---

<div class="post-metadata">

**Author:** ![alex.berg](https://avatars.discourse-cdn.com/v4/letter/a/b782af/32.png) [@alex.berg](https://forum.dynamobim.com/u/alex.berg)\
**Post date:** [September 28, 2017, 7:58am UTC](https://forum.dynamobim.com/t/multiple-inputs-for-the-node-element-setparameterbyname/15108/17 "2017-09-28T07:58:59Z")

</div>

Using a trial and error method I did got the needed results. Still don’t understand how this list matching actually works. 🙄

Stupid me, this is exactly what @Mostafa_El_Ayoubi had suggested 😅

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