SetLightShapeStyle Method


Light Family Set Light Shape Style Method

Set the light shape style to the given shape style

Namespace: Autodesk.Revit.DB.Lighting
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public void SetLightShapeStyle(
	LightShapeStyle lightShapeStyle
)

Parameters

lightShapeStyle LightShapeStyle
The light shape style value to set the light shape style to
Exceptions
Exception Condition
ArgumentOutOfRangeException A value passed for an enumeration argument is not a member of that enumeration
Example
public void ModifyLightShapeStyle(Document familyDoc)
{
    // Get the light family from the static method.
    LightFamily lightFamily = LightFamily.GetLightFamily(familyDoc);

    // Set the light shape style to circle
    lightFamily.SetLightShapeStyle( LightShapeStyle.Circle);

    // After light shape style set to circle, each type returns a CircleLightShape instance
    for (int index = 0; index < lightFamily.GetNumberOfLightTypes(); index++)
    {
        LightType lightData = lightFamily.GetLightType(index);
        CircleLightShape lightShapeInType = lightData.GetLightShape() as CircleLightShape; 
    }

}
See Also