Revit 2025.3 API
Building |
Sets the usage value for an hour.
Namespace: Autodesk.Revit.DB.Analysis
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.3.0.0 (25.3.0.0)
Syntax
public void SetValueForHour( int hour, double usage )
Public Sub SetValueForHour ( hour As Integer, usage As Double )
public: void SetValueForHour( int hour, double usage )
member SetValueForHour : hour : int * usage : float -> unit
Parameters
- hour Int32
- The hour in the day, as an integer. For example: 0 is 12:00 midnight to 1:00 am, 6 is 6:00 am to 7:00 am, 12 is 12:00 noon to 1:00 pm, and 23 is 11:00 pm to midnight. To avoid issues around daylight savings times, these hours represent 1/24 of an earth rotation, and will not be exactly 60 minutes.
- usage Double
- The usage as a fraction between 0 and 1 inclusive. For example: 0 in a lighting schedule means all lights are off, .5 means half of lights are on, 1 means all lights are on.

Exception | Condition |
---|---|
ArgumentException | hour must be from 0 to 23 inclusive. -or- usage should be less than or equal to 1. |
ArgumentOutOfRangeException | The given value for usage must be non-negative. |
See Also