An object that represents a Floor within the Autodesk Revit project.
Namespace:
Autodesk.Revit.DB
Assembly:
RevitAPI
(in RevitAPI.dll) Version: 23.0.0.0 (23.1.0.0)
Syntax
C# |
---|
|
Visual Basic |
---|
|
Visual C++ |
---|
|
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 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 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
System
Object
Autodesk.Revit.DB Element
Autodesk.Revit.DB HostObject
Autodesk.Revit.DB CeilingAndFloor
Autodesk.Revit.DB Floor
Autodesk.Revit.DB Element
Autodesk.Revit.DB HostObject
Autodesk.Revit.DB CeilingAndFloor
Autodesk.Revit.DB Floor