Counting list length

I think the answer is going to make me feel really stupid and I’m going to have to blame it on being on holiday for the last 3 weeks and other lame excuses but…

How do I get it to count the lower level so the output on my python node is 9 and not 1?

List.Count node.

1 Like

I want to do it in python.

Since you are feeding it a list of lists, you need to get the first item in the list, or you need to flatten it before.

1 Like

So I just needed to unwrap it?

image

Ah, no… ignore me…

Told you… been on holiday, brain is still away :smiley:

I need the [0] not the unwrap!

doh! Thanks :slight_smile:

Oh yeah, sorry about that, my default python template automatically unwraps everything and i didn’t think to look at it!

Are there cases where you wouldn’t want things unwrapped? If so would you be kind enough to give me an example :slight_smile:

Unwrapping the (Revit) elements gives you access to their Revit properties. If your just sorting or filtering them or if the inputs aren’t Revit elements then the unwrapping isn’t doing anything.

2 Likes