Appendix b example control macros, Activate specific key led, Appendix b example control macros -1 – Clear-Com Logic-Maestro User Manual
Page 129: Activate specific key led -1

Clear-Com Communication Systems
Eclipse Logic Maestro Instruction Manual
3 - 1
APPENDIX B
EXAMPLE CONTROL
MACROS
ACTIVATE SPECIFIC KEY LED
// When control LED0 is activated fourth key on each panel is illuminated red.
using System;
using ClearCom.ScriptHost;
using ClearCom.ScriptLibrary;
using ClearCom.Entities;
using EMS.MapClient;
using EMS.MapClient.Tables;
using EMS.MapClient.Tables.Actions;
using Shared.Enums;
namespace CustomControlMacros
{
public class CustomMacro : ScriptBase
{
public override void OnUserStart()
{
// Fetch the control that will trigger this action.
ControlMacro LED0 = ControlMacro.GetControl("LED0");
// Fetch the panels we wish to activate the LED on.
PortObject ISTA = ControlMacro.GetPort("ISTA");
PortObject D4222 = ControlMacro.GetPort("D4222");
PortObject[] panelArray = new PortObject[] { ISTA, D4222 };
foreach (PortObject panel in panelArray)
{
// Set up LED indications.
// Note1: LED will only indicate if a key is assigned here, i.e. can't illuminate empty key.
// Note2: Key numbers are silly, some start from 1, some from 0 etc
Action fireLed1 = ControlActions.ActivateLED(panel, 4, 1, 0, Shared.Enums.LedRate.On,
Shared.Enums.LedIndication.Red);
// Activate LEDs on.
LED0.Triggers(fireLed1);
}
}
}
}
3