Lunchbox - Room Collector limitation on amount of rooms?

I know this is a question on a custom node, but am wondering if the issue I’m having is related to a limit on the amount of rooms the phython script can handle…or maybe one that dynamo has a limitation on? It seems as if I have less than 3000 rooms the collector works…if I have more than 3000 it returns null. I will in the meantime try the room collector with Rhythm…but am wondering if the community knows about some limitation. Thanks in advance!

I tried with the Rhythm node and it didn’t work, I tried less than 3,000 rooms (2956 rooms) but the lunchbox node worked for the same 2956 rooms. I will keep this post updated with other findings.

What are you trying to retrieve from rooms?

Element, Boundary and Level are the 3 minimum items I need


A Python array (list) can hold more than 3000 items. Here’s an excerpt from StackOverflow:


According to the source code, the maximum size of a list is PY_SSIZE_T_MAX/sizeof(PyObject*).

PY_SSIZE_T_MAX is defined in pyport.h to be ((size_t) -1)>>1

On a regular 32bit system, this is (4294967295 / 2) / 4 or 536870912.

Therefore the maximum size of a python list on a 32 bit system is 536,870,912 elements.

As long as the number of elements you have is equal or below this, all list functions should operate correctly.


I doubt that this is the issue. It might be something else, but without a sample model we can’t really help you here.

Thank you Konrad…I have the dynamo script in this post

and I’m using a large revit project with over 3,700 rooms in the actual file (I have more in links…but the file has all links unloaded) and the lunchbox room collector returns nulls for all outputs. When I delete some rooms to get it below 3,000 rooms…it then works and collects the room information.

So if I understand your post the limitation is 3,000 items? If this is the case…then that is what is happening. Not many projects will have more than 3000 rooms…but I have been working on this script because of this size project… If there is this limitation of 3,000 elements (I got confused when you write 536,870,912 elements vs. 3,000 elements)…then I will need to customize the custom node to collect rooms per level and repeat the python script for each level…makes it trickier…especially for a newbie in dynamo…with zero python experience lol…but this will limit the script working for 3,000 rooms per level…which I hope to never encounter as a project! :wink:

Maybe start to use multiple nodes that grab them by level and do a list combine to the retrieve the other information?

I said that I DO NOT believe that list size is a problem here. My post clearly states that a list in Python can hold over 500 MILLION elements in it on a 32bit system.

I’ve noticed some unexplainable weirdness with Dynamo and performance

Refer Dynamo: performance

In my case, there seemed to be a hard ceiling/threshold somewhere between 20,000 and 30,000 objects
A little different to your problem of nulls.

I ended up just working around the problem.

Could you split it into smaller chunks e.g move rooms into separate worksets and unload the worksets/run Dynamo ?