I’m trying to create a Dynamo script that would copy several parameters from a space in a room to another plenum space located directly above it. Does anyone have an idea how to build such a Dynamo in the most efficient way?
I tried finding the center point of the plenum space, moving the point 2 meters down, and then checking which space contains that point. However, none of the nodes I used were able to detect which space the point belongs to.
Should isn’t the same as are, so be careful. I raised the question as it’d stink to miss something due to the way spaces were built or modified after you last worked on them… But Gavin’s method is the best path forward. There is a node for it, I just don’t recall which package it’s in. Check Rhythm as I believe it may have something for you. Step 1 would be take each space on level X, get the location point, translate it on the Z axis by it’s height + an assembly buffer, and get the space above that using the API method or the node in Rhythm/others.
Parts of your graph look like they should function, though it is hard to tell between language barrier and not being able to see the list outputs or warning dialogue.
Pozlom parameter - Is this supposed to have a string as value? I’m assuming this is the method used to separate plenum spaces from non-plenum spaces, but I would have thought that the Yes/No parameter for Plenums would have been used for the filter logic. A string of 1.5 is odd.
You’re using the bounding box for one collection of spaces and generating solids for the other collection of spaces. Bounding boxes are rectangular cuboids, so this may return false positives if you use them for irregularly shaped spaces.
Depending on Dynamo version, you may have access to Space.IsPointInsideSpace as part of the standard node list. I can verify it’s at least available in Revit 2025.
MEPover has a node that resets spaces and rooms to center the location you would retrieve with the GetLocation node (otherwise this location is from the point-and-click space generation method or autogenerated from the space generation tools, or accidentally modified when you drag the X-pattern in Revit). Using this ahead of time would mean not needing to generate any solids, which could improve script time if you’re working with a very large model.
Unless you prepare some filtering logic to reduce the list of checks down, you’ll need to crosslace - checking every Z-adjusted point against every space. It looks like you’re only using longest lacing right now, so you’re checking A to 1, B to 2, C to 3, etc.
I’ve got my dynamo working with Python Scrypt but what you wrote is great! Thank you very much for the detailed explanation. In my free time, I’ll try to use the recommended nodes.
P.S. Poziom 1.5 means floor 1.5 – a boundary level for the Plenum created specifically for the purposes of this script.