Set Boundary of Existing Floor

Hi,

I have existing floors in Revit and I want to edit their boundary after some geometric operation. Is there any way to do that other than deleting the element and adding a new one with the same properties?

1 Like

Iā€™ll look into a solutions, but thinking its going to be complex if we need to account for slopes and whatnot.

Can you provide a little more info on what you are trying to do.

What do you mean by ā€œafter some geometric operationā€?

Floor Edit

floor edit

Floor Edit after cutting void in Revit

floor edit with void

For ex, I am going to do region difference/union on floor boundary.

Thatā€™s how I made the notch in the example above.

These floors are created using Grasshopper. What I a meant was editing the boundary of existing floors in Revit that are not created from Rhino/Grasshopper curves.

There is API for this SketchEditScope, but only in Revit 2022.

I am using 2022. Iā€™ll try in Python. A native component would be awesome :+1:

1 Like

Any updates on a native component?

Weā€™ll only have components that are compatible with all installations (2018 +)

Hmm, I see. Maybe not a native component but can we at least have a User Object/Python script that does edit existing boundaries of elements (specifically walls, floors, and ceilings)?

One workflow that it definitely will be useful is editing the profile of walls. Especially extracting the intersections between Walls-Structural Framing elements is a really common task in the industry and I am sure a lot of people will benefit from this.

1 Like

Iā€™ll put in a feature request. I can see it being useful in certain workflows, although not sure how easily it will be to get the old curves, create intersections with other geometry then create new closed curves. That would require some robust grasshopper handling of intersections and rebuilding the curves, per individual workflows.

1 Like

Intersects Element Filter will become handy in that case (hopefully) After I find those elements, its only a matter of Solid Difference/Region Difference to get the final profiles.

Hey @mucahitbgoker

Hope this could be helpful, the component takes existing floors from Revit, and deletes the existing sketch lines from them and slope arrows (can be kept by removing the OR condition in the script according to the comments within) and then adds new profile curves as shown. Input Floors and new profile curves to be grafted accordingly.

This is my first ever working script :sweat_smile: so excuse any silly variable names or anything out of the norm throughout the code and am open to any comments that would help me improve :slight_smile:

Also, the components could use some checking and error mitigating, so make sure to input suitable horizontal planar curves within Revitā€™s tolerance etcā€¦

(Only tested on this sample and Revit 2022)

EditFloorBoundary
EditFloorSketchBoundary.gh (13.7 KB)

1 Like

Hi @M.Tarabishy,

Thanks for taking the time to create a custom component. Not a C# expert myself but if it deleting existing floors and creating new ones is not what I want to achieve. For instance, walls can have Doors on them and I want to keep those elements too. Thatā€™s why deleting and recreating wonā€™t work in my case.

Hey, @mucahitbgoker so the component is not deleting the element, the component is modifying the sketch of the element and as you can see from the panels in the GIF the input and output floors have the same element ID, the component uses the SketchEditScope Class mentioned earlier by @kike which gives access to the sketch lines of floors, roofs,walls and ceiling

2 Likes

Oh, got it. After reading your post I assumed thatā€™s what it was doing and didnā€™t pay attention to GIF. Thanks for clarifying @M.Tarabishy, Iā€™ll give it a try and let you knowšŸ™

Hey again,

Attached you will find a working version for editing wall sketches, the difference is that walls donā€™t have a sketch profile by default, so added a CreateProfileSketch if none is available, and the same procedure follows as floors by deleting old sketch lines and generating new ones.

My suggestion would be to create new walls/floors using the native RiR components to test and make sure your profile curves donā€™t contain any out of tolerance/errors, and then if all is good, connect them to the C# component and run to edit your current walls/floors.

Again, not tested too much only on the sample shown in GIF, so let me know how it goes/what needs fixing.

EditWallBoundary
EditWallSketchBoundary.gh (14.0 KB)

2 Likes

Not sure how to edit the previous replies or if it is possible or not, but here we goā€¦

Attached are updated C# Components after a bit of testing/adjustment.

What changed: I found that Rhino curves needed to be exploded before being converted to Revit curves using the RiR GeometryEncoder (correct me if I am wrong).

So, I added a bit of code to do just that and the C# Components are now working as expected in more tested samples.

EditFloorSketchBoundary.gh (11.1 KB)
EditWallSketchBoundary.gh (8.2 KB)

3 Likes

I did take a look at ā€œEdit Floor Sketch Boundaryā€ node and tried different scenarios, afais it works just fine. Thanks @M.Tarabishy.

Iā€™ll try wall sketch and let you know when i get a chance.

1 Like