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: 2015.0.0.0 (2015.0.0.0)
Since: 2013
Syntax
C# |
---|
|
Visual Basic |
---|
|
Visual C++ |
---|
|
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