I want to edit the sketch of an existing floor or slab

Hi Dynamo Community,

I would like your help to vote up my idea. Revit’s API doesn’t have the ability to edit the floor sketch. I would like that to change. I have posted the idea for Autodesk.

Editing the sketch programmatically would allow us to monitor slab edges, and wall sketches for coordination between models/disciplines. This would be helpful for our Dynamo community.

Thank you.

Here is the link to Vote.
https://forums.autodesk.com/t5/revit-ideas/autodesk-answer-day-edit-sketch-in-api/idi-p/6334613

Done.

Btw we do have partial control over an element’s sketch, but extracting the sketch curves is costly.

Once we get the correct sketches, we can move them around:

delete any internal loops:

or (if you’re really adventurous), the external loop:

Thank you, everyone, for voting.

Dimitar,
This is great. Thank you for the example.

Nice one guys!
How can I get the centre of openings in slabs, rectangular and especially round ones.

Kind regards

Dimitar, do you know of any way to add sketch lines?

The gift that keeps on giving. How did you … where did you … . The ElementId - 1 gives you the sketch id, if the element is sketched based?!?

Genius. Thanks yet once again.

@Dimitar_Venkov are you using this solution, so not recreating a new floor? Seems very very cool solution, btw I’m trying to do in a addin, so I cannot use you Dynamo nodes

Yes, if I remember correctly the code was similar to the solution posted here:

I’ve take a look at.your node and yes, you are getting the lines from deletion. The question is: can we just modify a slab loop with the only same number of lines? Can’t I add new curves on the loops, am I right?

You could also try the new Element.GetDependentElements, however I don’t think there’s any way to add new curves to an existing sketch at this moment.

@Dimitar_Venkov ´s Solution in Python works great (as always) and as an example, here I have used it for a simple task that I need to repeats hundreds of times on a project: Move ONE edge of the sketch (at the window bay) inwards by 60mm. This scrips runs great in the Dynamo Player and saves me a few clicks (multiply that with a couple 100, and you see the benefits.)

I made it so that the edge that I select also identifies the edge that I want to adjust.

A great improvement would be if either I didn´t need to confirm the edge selection again in Revit (that would save me a third of the clicks), OR if I could select multiple edges of multiple objects, but that would require changing Dimitar´s Python script and the adjacent code block.

Thanks again!!!