Calculated Value to "Comments" Shared Parameter

Hi,
I need help. I have checked the forums and can’t get my calculated value from my revit schedule into a “Comments” shared parameter.
The calculated value is “LENGTH ROUNED” which a length of conduit. I want the LENGTH ROUNDED calculated value to show in a Tag, so when I tag my conduit in Revit it tags the total run length, not just the segment.

Hi!
Is there any reason you are using list.restof items and string.ToNumber in your graph?

If I remove that node, I still get the same issue.

I still don’t understand what the string.tonumber is used for

The comment field is expecting text so you can only write strings to the comments field not numbers. If your out put of your calculation is a list of strings, this van be passed straight to your set parameter node. If it is a list of numbers you need to use the String.FromObject node not string to number.

And String.ToNumber is doing exactly the opposite

So I can get the script to push calculated value to the “Comments” shared parameter but it fills in the incorrect calculated values to each comments cell.
Value 1 - supposed to be 40ft, shows up as 50ft
Value 2 - Supposed to be 50ft, shows up as 70ft
Value 3 - Supposed to be 70ft, shows up as 40ft
How do I make sure it sends the right value to the right revit family instance?

You have to come up with a way to match the calculated values with the elements. They have to be ordered in the same way.
How exactly to do that depends entirely on what’s your input. You can search for sorting lists in the forum.
I can imagine getting from the schedules the elements’ names and use them to match the elements.
Another way could be recreating the calculated value entirely in dynamo.

I tried creating lists, but can’t get it to create the proper order. Right now the parameter pushes to the revit file but not to the right revit family because of the ID sorting issue.

What are the nodes you recommend to sort? I tried create list, reverse list, and a whole bunch of other items.

Can someone please take a look at my .dyn file and give me some guidance?

PREFAB_CONDUIT RUN SCRIPT FILL IN COMMENTS.dyn (10.5 KB)