Wall Class


Represents a wall in Autodesk Revit.

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

Syntax

C#
public class Wall : HostObject
Visual Basic
Public Class Wall _
	Inherits HostObject
Visual C++
public ref class Wall : public HostObject

Remarks

The wall object represents all the different kinds of walls in Revit.

Examples

Copy C#
public void GetInfo_Wall(Wall wall)
{
    string message = "Wall : ";
    // Get wall AnalyticalModel type
    AnalyticalModel model = wall.GetAnalyticalModel();
    if (null != model)
    {
        // For some situation(such as architecture wall or in building version),
        // this property may return null, but if it doesn't return null, it should 
        // be AnalyticalModelWall.
        message += "\nWall AnalyticalModel type is : " + model;
    }

    wall.Flip();
    message += "\nIf wall Flipped : " + wall.Flipped;
    // Get curve start point
    message += "\nWall orientation point is :(" + wall.Orientation.X + ", "
        + wall.Orientation.Y + ", " + wall.Orientation.Z + ")";
    // Get wall StructuralUsage
    message += "\nWall StructuralUsage is : " + wall.StructuralUsage;
    // Get wall type name
    message += "\nWall type name is : " + wall.WallType.Name;
    // Get wall width
    message += "\nWall width is : " + wall.Width;

    TaskDialog.Show("Revit",message);
}
Copy VB.NET
Public Sub GetInfo_Wall(wall As Wall)
    Dim message As String = "Wall : "
    ' Get wall AnalyticalModel type
    Dim model As AnalyticalModel = wall.GetAnalyticalModel()
    If model IsNot Nothing Then
        ' For some situation(such as architecture wall or in building version),
        ' this property may return null, but if it doesn't return null, it should 
        ' be AnalyticalModelWall.
        message += vbLf & "Wall AnalyticalModel type is : " & model.ToString()
    End If

    wall.Flip()
    message += vbLf & "If wall Flipped : " & Convert.ToString(wall.Flipped)
    ' Get curve start point
    message += vbLf & "Wall orientation point is :(" & Convert.ToString(wall.Orientation.X) & ", " & Convert.ToString(wall.Orientation.Y) & ", " & Convert.ToString(wall.Orientation.Z) & ")"
    ' Get wall StructuralUsage
    message += vbLf & "Wall StructuralUsage is : " & Convert.ToString(wall.StructuralUsage)
    ' Get wall type name
    message += vbLf & "Wall type name is : " & Convert.ToString(wall.WallType.Name)
    ' Get wall width
    message += vbLf & "Wall width is : " & Convert.ToString(wall.Width)

    TaskDialog.Show("Revit", message)
End Sub

Inheritance Hierarchy

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 →