I’m working on a problem where I have multiple floors in revit and I want to update the boundaries of those floors to some new floor boundary. I could of course, delete the existing floors and then make new floors but this would remove any tags, etc that are referencing the existing floors.
I’ve been googling, and it seems like the Revit API does not allow direct access to editing the floor boundary but some clever people found a work around where you can use a temporary transaction to delete the floor, this returns the boundary model line ids. You then abort the transaction and update those boundary model lines to new lines. A limitation is that there must be the same # of new boundary lines as existing boundary lines, but that’s ok in my case. Here is a post about the clever workaround-workflow: https://adndevblog.typepad.com/aec/2013/10/change-the-boundary-of-floorsslabs.html
I’m wondering how to duplicate this workflow with RhinoInside. I can use the Element Dependents node to see the Revit Curve elements and their Element Ids but I’m not sure how to update the curves associated with these elements to the new location. Eventually I’d like to get the update to work with arcs & lines but for now I’m just using lines.
One crucial thing to note is that you must supply the same number of sketch curves for the new outline as are in the existing floor outline. Another issue I ran in to was, be sure to arrange the new curves GH tree structure to match the existing curves GH tree structure. So if your floor boundary consists of [arc, straight line, arc, straight line], be sure to feed in your new curves in the same order. Also, ensure that the direction of your new curves match the direction of the existing boundary curves. It can also work for floors with voids.
Hi Michael, I’m trying to figure out a similar issue, where I have a set of floor in Revit generate via grasshopper “ADD FLOOR” function. However every time I close revit the association is lost and “ADD FLOOR” makes a second set of floors on top. Could your script somehow be used to tackle this issue and make the floors generated from grasshopper truly parametric?
We are working on Element binding, so that specific objects will be able to be updated. For now if the floors came from Grasshopper, then previous floors need to be deleted. But if the floors are modified from Revit floors the Update boundary works.
Hi Scott thank you for your response - it would be amazing to have element binding for floors/railings/etc that are built from a curve. However can you elaborate a bit on the last part of your response? Is there an “update boundary” function in GH that can update a set of existing floors? (If so, what if I generate the floors from GH, then unpin them so they become revit floors not tied to a GH script, and then use the same script to update their boundaries that way?)
While McNeel develops element binding functionality, I think the script I posted could be used to update your floors. I think you could generate floors with GH, close GH, unpin the floors, open new GH session, and then update their boundaries with the script.
But there is the severe limitation with the script that the new floor boundary must have the exact same number of curves as the existing floor boundary. It’s a limitation of the Revit API and there is no current work around that I am aware of unfortunately. So you can, essentially, modify the control points of the boundary curves but you cannot, say, change a rectangular floor boundary to a octagonal floor boundary. In that case you need to delete the existing floor and add a new floor. Hope this helps