How to split walls by levels

Hello everyone!

There are many walls in Revit model with height from level 1 to level 10. How to split all walls by all levels using Dynamo?

I’m also facing the same problem.

Any help ?

I have not done this…but I think I can point you in the right direction as i have done something similar with columns. There is no “Split” command available in the API (major oversight in my opinion) that can operate automatically. The only Split command available in the API requires you to then use your mouse to “show” Revit where to split…so essentially this can’t be done in Dynamo.

Instead of “Split” approach the problem as Duplicate and change Top and Bottom. So supposing you start with one wall that crosses 10 levels. You will need to create 9 more copies of that wall, then adjust the top and bottom parameters of your original wall and the 9 duplicates so that the end result is the same as what the split command would have given you. I know this is not exactly what you want and is problematic if you already have opening, etc. But i think that is the best that can be done until the API has an automated Split command that takes and Element ID and a Splitting Plane as inputs.


1 Like

File: wallSplit.dyn

Demo: WallSplit.rvt (2015)

The above definition should work provided all walls are of the same height, unattached and extends from base constraint to top constraint without base offset or top offset.

A definition without the above limitations should be possible. Might require a lot more thought and will be a lot more complicated.




It appears that your definition also has the same limits that I noted (these are Revit Limitations…not Dynamo). You are creating new walls by Dynamo Geometry Intersects, but you are still creating new walls instead of splitting the old walls. If a Split method truly were available, then we could simply split the wall in question without any issues with elements hosted on the walls. If you have access to the Revit API help, look up the “MirrorElement” method. That method takes as inputs the document, the element Id that you are mirroring, and the plane about which you are mirroring. But the “SplitElement” method does not exist except as an enumerable - which will require us to actually point on the screen and tell Revit where to split the element. Please correct me if I am interpreting this wrong…but it appears to me that there is no way (no easy straight-forward way) to write a script that reproduces the “split” command in Revit without actually having to duplicate or create new walls explicitly.


Because of the reasons above…if you do want to use the method Vikram showed or the method I describe to “pseudo-split”, it needs to be done BEFORE any hosted doors, windows, electrical receptacles, lights etc are placed on the walls…otherwise there will be a lot of re-hosting cleanup or missing hosts problems…

Ben is right. The definition I posted would have very limited utility considering a normal workflow.

The definition just demonstrates that at a basic level the task is possible (not considering related practical problems)