Editing Parameter Value

Hi guys! newbie here, I hope someone can help me on this.

It says “Warning: Element.SetParameterByName operation failed. No parameter found by that name.”

It runs perfectly if I did not sort it by the value, but once I use the List.Slice the parameter name can not recognized.

Can you share your graph…

1 Like

Can you explain what you’re trying to do? The second half of your graph doesn’t really make sense. You get the parameter and then you split the list only to try to convert it back to itself. I think you’re trying to get the element here, as @_Vijay suggested, but you also split the list only to provide the same value to all the elements.

1 Like

Hi Nick, I want to sort it by parameter value and select only the value “E” and change it to “N”, is my sorting not correct?

Thanks @_Vijay :slightly_smiling_face:

Doing it manually (picking the elements to filter by index) isn’t very effective. You’d have to modify your graph every time the lsit changes.

I’d suggest using Element.GetParameterValueByName instead of Parameter.ParameterByName. ParameterByName returns the parameter element whereas GetParameterValueByName will return just the value. You can then use a conditional statement or String.Replace node to replace all ‘E’ values with ‘N’.

This will work for any list of values in any order.

1 Like

Thanks Nick, this makes it more easier to understand, unlike mine :slight_smile: