Math.Sum_To sum a list of parameters ( width)


#1

Hi, I´m trying to sum a list of parameters ( widht) that I have obtained from " GetParameterValueByName(TypeOrInstance)", but when I use “Math.sum” it says Warning: asked to convert non-convertible types.
Please help!


#2

Are any values ‘null’ or blank?


#3

Thanks for your reply,
No, there isn´t any nulls or blanks, because i just clean up the list from them.


#4

You removed null elements, but not null parameter values. Try adding another list.clean after the get prametervaluebyname node. :slight_smile:


#5

Perfect!
I checked the parameters list and there were some items in 0 or in blank, so I went to Revit to localize those families by ID. I realized that there were some " hole" doors that had RoughWitdth parameter instead of WIDTH parameter, so I replaced the name of the parameter and dynamo recognized it perfectly and did the sum!
Thanks a lot!
vano en blanco


#6

Good news. Please mark the solution so that others can use this to help themselves in the future.