This class represents a set of lights grouped together for easier management of various lighting scenarios
Namespace: Autodesk.Revit.DB.Lighting
Assembly: RevitAPI (in RevitAPI.dll) Version: 23.0.0.0 (23.1.0.0)
Since:
2013
Syntax
C# |
---|
public class LightGroup : IDisposable |
Visual Basic |
---|
Public Class LightGroup _ Implements IDisposable |
Visual C++ |
---|
public ref class LightGroup : IDisposable |
Examples

public void AddRemoveLightInGroup(LightGroup groupOne, LightGroup groupTwo, FamilyInstance lightOne, FamilyInstance lightTwo) { // Add two lights into groupOne. groupOne.AddLight(lightOne.Id); groupOne.AddLight(lightTwo.Id); // Move a light from groupOne to groupTwo groupTwo.AddLight(lightOne.Id); // Retrieve the added lights in the group ICollection<ElementId> existingLightIds = groupOne.GetLights(); // remove the light groupOne.RemoveLight(lightTwo.Id); }

Public Sub AddRemoveLightInGroup(groupOne As LightGroup, groupTwo As LightGroup, lightOne As FamilyInstance, lightTwo As FamilyInstance) ' Add two lights into groupOne. groupOne.AddLight(lightOne.Id) groupOne.AddLight(lightTwo.Id) ' Move a light from groupOne to groupTwo groupTwo.AddLight(lightOne.Id) ' Retrieve the added lights in the group Dim existingLightIds As ICollection(Of ElementId) = groupOne.GetLights() ' remove the light groupOne.RemoveLight(lightTwo.Id) End Sub
Inheritance Hierarchy
System..::..Object
Autodesk.Revit.DB.Lighting..::..LightGroup
Autodesk.Revit.DB.Lighting..::..LightGroup