Set parameters by name in project

Hi there,

I am trying to add parameters from an Excel file to my project.
Therefore I want to use the OOTB “Element.SetParameterByName” or the DynMEP “Element.SetParameterValueByName” node.
In this example I want to add the values (lower left corner) to the parameters that are already set in the project (upper left corner) to the elements in the middle.
So I want to add the value and parameter with the indices 0 to the elements in the 0 List and so on.

Is there some way to get this going for example with setting levels or lacing?

Thank you and best wishes!

hi @bnn3001 ,

Use levels to set parameter values for different levels.

1 Like

Hi @jaisonpr777 ,
thank you, great, it is working!

In another branch of my graph and in the Excel sheet I also want to offer an option to select “every category” , so that the parameters can be added to every element in the project. Therefore your suggestion of the use of levels is not working properly.

In this case I want to add every Indices of “parameterName” and “value” to every element selected.
So the “output number” here should be 33 and not 8 I guess.

Do you have any idea how I can solve this?
Thank you and best wishes!

Is setting the levels of “parameterName” and “value” to 1 and of “element” to 3 and the lacing to “longest” the correct way?

in your list index, the number of items is different.
someplace you have 1 item or might be more than the parameter number,
this will be a problem I guess.
And I am not sure about the parameters data type. because some null values are coming in the list (null in Element.SetParameterByName)

If you are looking for another solution for another problem, I suggest you to add a new topic.