Element.SetParameterByName not working after multiple String / Number conversion

Hello World,

Hopefully, someone can help me out here, I’m pulling my hair out on this problem

In the graph below we see two runs, whereby along the bottom, in Pink, we are successfully assigning the Room parameter “OKFF” after adding the Level “Elevation” of a Room, with the “Base Offset” of a Room, and converting this to a String with 3 decimal places and “m” for metres at the end.

Along the top, we see an unsuccessful series, whereby following to conversion of the Parameter “Boden - Gesamtaufbau” (sorry for the German) from a String to a Number, which is then subtracted from the “Elevation” of the Room’s level, and then converted back into a String, the Room Parameter “OKRF” cannot be set…

A zoom in of this part of the graph can be seen here;

To make things even more strange, when I click to show the values of the list along the graph, it appears that everything is working up until the point of setting the parameter:

Does anyone have any ideas?

I would be incredibly grateful.

Happy Friday!

Dynamo Graph also attached:
Raum_Höhenkoten.dyn (87.5 KB)

Update! The first value of the final list is in actual fact assigned by Element.SetParametersByName…

Weird no?

Magenta = Correct
Green = Wrong, Weird and incredibly frustrating

Try to eliminate you timeline, put your Getparameter Node (which you are only using to check if the parameter has been set correctly? - just check in a Revit Schedule for this test) behind the Set Parameter Node.

From the picture it looks like you’re Getting and Setting the same parameter from the same elements at the same time.

*Look into Passthrough or Transaction Nodes.

Thanks for the speedy response Bjorn.

The problem still exists after deleting the “Get.Parameter.ByName”

The warning is at the “String.ToNumber” Node and says:

“Warning: String.ToNumber operation failed.
Not a valid number.
Parameter name: str”

Any ideas?

Hard to have any idea, your screenshot cannot be read and you should show the data going in and out of the Node that gives the errors.

Sorry, Bjorn, it’s a long Graph…

I posted the .dyn above. Here again attachedRaum_Höhenkoten.dyn (87.5 KB)

Thanks for your help

I ended up solving this by going down a different path.

Thanks for your support anyway Bjorn!