ResetSlabShape 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: 2015.0.0.0 (2015.0.0.0)

Syntax

C#
public void ResetSlabShape()
Visual Basic
Public Sub ResetSlabShape
Visual C++
public:
void ResetSlabShape()

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.

Examples

Copy C#
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.SlabShapeEditor;
            slabShapeEditor.ResetSlabShape();
        }
    }

}
Copy VB.NET
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.SlabShapeEditor
            slabShapeEditor.ResetSlabShape()
        End If
    Next

End Sub

See Also

ArchiLabs Desktop

Put AI to work inside Revit.

Give Desktop your instructions and project files to build Revit families, update model elements, and create views and schedules. Works directly in Revit and AutoCAD.

Explore Desktop →