Namespace:
Autodesk.Revit.DB.Lighting
LightGroup
Class
Description:
This class represents a set of lights grouped together for easier management of various lighting scenarios
This class represents a set of lights grouped together for easier management of various lighting scenarios
Inheritance Hierarchy:
System.Object
Autodesk.Revit.DB.Lighting.LightGroup
System.Object
Autodesk.Revit.DB.Lighting.LightGroup
Syntax
public 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);
}