SlabShapeEditor.ResetSlabShape Method

SlabShapeEditorResetSlabShape Method

Removes the modifications made during editing and resets the element geometry back to the unmodified state.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public void ResetSlabShape()
Public Sub ResetSlabShape
public:
void ResetSlabShape()
member ResetSlabShape : unit -> unit 
Remarks
Calling this method will reset the slab back to its original state and disable Slab Shape Editing. If further editing is needed, call Enable again.
Example
private void ResetSlabShapes(Autodesk.Revit.DB.Document document)
{
    UIDocument uidoc = new UIDocument(document);
    ICollection<ElementId> selectedIds = uidoc.Selection.GetElementIds();
    foreach (ElementId id in selectedIds)
    {
        Floor floor = document.GetElement(id) as Floor;
        if (floor != null)
        {
            SlabShapeEditor slabShapeEditor = floor.GetSlabShapeEditor();
            slabShapeEditor.ResetSlabShape();
        }
    }

}
Private Sub ResetSlabShapes(document As Autodesk.Revit.DB.Document)
    Dim uidoc As New UIDocument(document)
    Dim selectedIds As ICollection(Of ElementId) = uidoc.Selection.GetElementIds()
    For Each id As ElementId In selectedIds
        Dim floor As Floor = TryCast(document.GetElement(id), Floor)
        If floor IsNot Nothing Then
            Dim slabShapeEditor As SlabShapeEditor = floor.GetSlabShapeEditor()
            slabShapeEditor.ResetSlabShape()
        End If
    Next

End Sub

No code example is currently available or this language may not be supported.

No code example is currently available or this language may not be supported.

See Also