ComputeVolumes Property


Area Volume Settings Compute Volumes Property

True to enable volume computation. False to disable it.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 27.0.4.0 (27.0.4.0)
Syntax
public bool ComputeVolumes { get; set; }

Property Value

Boolean
Remarks
When this setting is False, rooms and spaces will be treated as simple extrusions of their 2d boundaries. The volume parameter will report "not computed". When this setting is True, the geometry of rooms and spaces will be trimmed when it intersects elements such as ceilings, roofs, and floors.
Example
C#
public void GetRoomDimensions(Document doc, Room room)
{
    String roominfo = "Room dimensions:\n";
    // turn on volume calculations:
    using (Transaction t = new Transaction(doc, "Turn on volume calculation"))
    {
        t.Start();
        AreaVolumeSettings settings = AreaVolumeSettings.GetAreaVolumeSettings(doc);
        settings.ComputeVolumes = true;
        t.Commit();
    }

    roominfo += "Vol: " + room.Volume + "\n";
    roominfo += "Area: " + room.Area + "\n";
    roominfo += "Perimeter: " + room.Perimeter + "\n";
    roominfo += "Unbounded height: " + room.UnboundedHeight + "\n";
    TaskDialog.Show("Revit",roominfo);
}
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 →