Replace the current initial intensity object with the given object
Namespace: Autodesk.Revit.DB.Lighting
Assembly: RevitAPI (in RevitAPI.dll) Version: 22.0.0.0 (22.1.0.0)
Since: 2013
Syntax
C# |
---|
|
Visual Basic |
---|
|
Visual C++ |
---|
|
Parameters
- initialIntensity
- Type: Autodesk.Revit.DB.Lighting InitialIntensity
An object derived from an InitialIntensity object
Remarks
The argument object is cloned
Examples

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);
}
}

Public Sub SetInitialIntensityProperty(lightType As LightType)
Dim initialIntensity As InitialIntensity = lightType.GetInitialIntensity()
If TypeOf initialIntensity Is InitialFluxIntensity Then
Dim fluxIntensity As InitialFluxIntensity = TryCast(initialIntensity, InitialFluxIntensity)
Dim fluxValue As Double = fluxIntensity.Flux
' Set new value for Flux proeprty and set modified InitialIntensity to LightType.
fluxIntensity.Flux = 34.5
lightType.SetInitialIntensity(fluxIntensity)
' Create a InitialWattageIntensity and set it to LightType.
Dim wattageIntensity As New InitialWattageIntensity(25.57, 130.89)
lightType.SetInitialIntensity(wattageIntensity)
End If
End Sub
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions ArgumentNullException | A non-optional argument was null |