SetLightShape Method


Replace the current LightShape 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#
public void SetLightShape(
	LightShape lightShape
)
Visual Basic
Public Sub SetLightShape ( _
	lightShape As LightShape _
)
Visual C++
public:
void SetLightShape(
	LightShape^ lightShape
)

Parameters

lightShape
Type: Autodesk.Revit.DB.Lighting LightShape
An instance of an object derived from LightShape

Remarks

The argument object is cloned. Light shape is a family element parameter. All other LightType properties and methods except for light distribution 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

Exception Condition
Autodesk.Revit.Exceptions ArgumentException The LightShape is the argument that is being validated The LightShape is not valid because it of a different derived type than the current LightShape derived type.
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was null

See Also