SetLightDistribution Method


Replace the current LightDistribution object with the given object

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

Syntax

C#
public void SetLightDistribution(
	LightDistribution lightDistribution
)
Visual Basic
Public Sub SetLightDistribution ( _
	lightDistribution As LightDistribution _
)
Visual C++
public:
void SetLightDistribution(
	LightDistribution^ lightDistribution
)

Parameters

lightDistribution
Type: Autodesk.Revit.DB.LightingLightDistribution
An instance of an object derived from LightDistribution

Remarks

The argument object is cloned Light distribution is a family element parameter. All other LightType properties and methods except for light shape are family type parameters. Changes to family type parameters may not be committed in the same transaction with changes to family element parameters, otherwise the modifications to the family type may be lost. Always use a separate transaction for changes to the shape and distribution of a light.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentException The LightDistribution is the argument that is being validated The LightDistribution is not valid because it of a different derived type than the current LightDistribution derived type.
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null

See Also