Rounded Space air flow to air terminals

Hey everyone. I have been working on a script that I found here https://www.youtube.com/watch?v=u2R2l53qyh8&list=WL&index=1

The second script in the video is what I am working on.

It takes specified air flow and applies it to air terminals within the space. It takes the airflow divides by the amount of diffusers in the space and then rounds it so they are nice even numbers and then applies those to the diffusers. I am currently getting some errors.

BlockquoteWarning: Element.SetParameterByName operation failed.
The call is ambiguous between the following methods or properties: ‘Revit.Elements.InternalUtilities.ElementUtils.SetParameterValue(Autodesk.Revit.DB.Parameter, Revit.Elements.Element)’ and ‘Revit.Elements.InternalUtilities.ElementUtils.SetParameterValue(Autodesk.Revit.DB.Parameter, string)’

I would appreciate it if someone could help me solve the issue. If figured out I can post the final script to share.

Hi,

I suspect the problem is that your list of values begins with nulls, so the method doesn’t know which one you will be feeding it. Perhaps you could filter out the nulls? I don’t think you will be able to be more explicit in a code block about which method to call.

Hopefully that is useful,

Mark