GetSunrise Method


Identifies the sunrise time for the SunAndShadowSettings element at its current location and indicated date.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since:  2011

Syntax

C#
public DateTime GetSunrise(
	DateTime date
)
Visual Basic
Public Function GetSunrise ( _
	date As DateTime _
) As DateTime
Visual C++
public:
DateTime GetSunrise(
	DateTime date
)

Parameters

date
Type: SystemDateTime
The date for which to determine sunrise time.

Return Value

The date and time. The value will be in Coordinated Universal Time (UTC).

Remarks

The value returned is affected by the value of the UsesDST flag set for the current location. If this value is true, the sunrise value will be adjusted for Daylight Savings Time, regardless of the value of the input date.

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 →