Floor Class


An object that represents a Floor within the Autodesk Revit project.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 2015.0.0.0 (2015.0.0.0)

Syntax

C#
public class Floor : CeilingAndFloor
Visual Basic
Public Class Floor _
	Inherits CeilingAndFloor
Visual C++
public ref class Floor : public CeilingAndFloor

Remarks

This object derived from the Element base object and such supports all the methods of that object such as the ability to retrieve the parameters of that object.

Examples

Copy C#
public void ShowFloorInfo(Floor floor)
{
    string message = "Floor : ";
    // Get Floor AnalyticalModel
    message += "\nFloor AnalyticalModel is : " + floor.GetAnalyticalModel();

    // Get Floor type name
    message += "\nFloor type name is : " + floor.FloorType.Name;
    try
    {
        // Get Floor span direction angle
        message += "\nFloor span direction angle is : " + floor.SpanDirectionAngle;
    }
    catch (Exception)
    {
        // an exception is thrown if floor is non-structural
        message += "\nFloor is non-structural.";
    }

    TaskDialog.Show("Revit",message);

}
Copy VB.NET
Public Sub ShowFloorInfo(floor As Floor)
    Dim message As String = "Floor : "
    ' Get Floor AnalyticalModel
    message += vbLf & "Floor AnalyticalModel is : " & floor.GetAnalyticalModel().ToString()

    ' Get Floor type name
    message += vbLf & "Floor type name is : " & Convert.ToString(floor.FloorType.Name)
    Try
        ' Get Floor span direction angle
        message += vbLf & "Floor span direction angle is : " & Convert.ToString(floor.SpanDirectionAngle)
    Catch generatedExceptionName As Exception
        ' an exception is thrown if floor is non-structural
        message += vbLf & "Floor is non-structural."
    End Try

    TaskDialog.Show("Revit", message)

End Sub

Inheritance Hierarchy

See Also