List comparison returns empty

Trying to take IN[0] and find the index where it is less than or equal to IN[1] and use that index to get the value of IN[2]. I had it working but in an attempt to clean it up a colleague edited the script and I am apparently screen blind to now. Thoughts?

@dsmith Please post your dyn

@salvatoredragotta Apologies. Running on fumes. It reads in an excel which is also here and imports pipes and pulls values from there. Plumbing Pipe Sizing Tables.xlsx (56.8 KB)
CW_HW Pipe Sizing.dyn (226.8 KB)

1 Like


Doesn’t your function require arguments?


:weary: probably should shouldn’t it…

Does it work now?

I may need a Revit file to test it.

It would be nice if you could keep the files you uploaded before for people who will read the post in the future

Mine shows it is?

Figured it out they had removed the part where arguements are called later and there is a 4th list that gets appended to to output data that they removed because it said L4= and they thought it was a placeholder…

They have been put back.
In the future, please do not remove files you provide after getting help.

1 Like

Your 3 inputs are structured differently. IN[1] and IN[2] are lists, whereas IN[0] is a list of lists. So, your for x in L1 is only looping once, where x is your entire list of values. Therefore, when you test your entire list (x) as being less than or equal to a single value (v), it is evaluating as false.

1 Like