Multiple inputs for the node Element.SetParameterByName

Hi everyone,

Long story short. I have 4 generic models with 2 parameters: A and B to which I need to assign values.
test

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

test.dyn (2.7 KB)
test.rfa (332 KB)

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?

1 Like

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

List at level functions. :slight_smile:

What do you mean exactly?

This should work:

1 Like

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.

1 Like

@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…

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?

Hi @alex.berg

This is my way of doing this

image

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 (13.2 KB)

Marcel

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

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!

@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

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. :smiley:

2 Likes

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!

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

Stupid me, this is exactly what @Mostafa_El_Ayoubi had suggested :sweat_smile: