SetInitialIntensity Method


Light Type Set Initial Intensity Method

Replace the current initial intensity object with the given object

Namespace: Autodesk.Revit.DB.Lighting
Assembly: RevitAPI (in RevitAPI.dll) Version: 27.0.4.0 (27.0.4.0)
Syntax
public void SetInitialIntensity(
	InitialIntensity initialIntensity
)

Parameters

initialIntensity InitialIntensity
An object derived from an InitialIntensity object
Exceptions
Exception Condition
ArgumentNullException A non-optional argument was null
Remarks
The argument object is cloned
Example
C#
public void SetInitialIntensityProperty(LightType lightType)
{
    InitialIntensity initialIntensity = lightType.GetInitialIntensity();
    if (initialIntensity is InitialFluxIntensity)
    {
        InitialFluxIntensity fluxIntensity = initialIntensity as InitialFluxIntensity;
        double fluxValue = fluxIntensity.Flux;

        // Set new value for Flux proeprty and set modified InitialIntensity to LightType.
        fluxIntensity.Flux = 34.50;
        lightType.SetInitialIntensity(fluxIntensity);

        // Create a InitialWattageIntensity and set it to LightType.
        InitialWattageIntensity wattageIntensity = new InitialWattageIntensity(25.57, 130.89);
        lightType.SetInitialIntensity(wattageIntensity);
    }
}
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 →