Is it possible to link a legacy map to a new alarm without an alarm defiition?

Our plugin can fire alarms without needing an alarm definition to be defined. Is it possible to add the map GUID to the event header or the alarm so that we can see a map appear in the Alarm Manager when a user clicks on the alarm line?

var eventHeader = new VideoOS.Platform.Data.EventHeader()
                    {
                        ID = Guid.NewGuid(),
                        Class = "NewEventToRule",
                        Type = "AlarmServer SIA Alarm",
                        Timestamp = DateTime.Now,
                        Message = alarmMessage,
                        Name = $"{settings.Name}",
                        Source = eventSource,
                        Priority = (ushort)priority.IconColor,
                        PriorityName = priorityName,
                        CustomTag = $"Model Name: {model.Name}, Model Type: {model.Type}",                   
                    };
 
                    var refList = new ReferenceList();
                    var cams = Util.GetCameras(settings.Cameras);
                    foreach (var c in cams)
                    {
                        refList.Add(new Reference() { FQID = c.FQID });     // Ensure that camera will be presented in the preview
                    }
 
                    Alarm alarm = new Alarm()
                    {
                        EventHeader = eventHeader,
                        StateName = "New",
                        State = 1,
                        ReferenceList = refList,
                        //[Date Time] [Point Point Name] [SIA Code Sia Name] [Priority]
                        Description = $"[{DateTime.Now.ToString("G")}] {alarmMessage} {m.Code.Description}",
                        
                        //AssignedTo = "test (\\test)"
                        // Basic user with the name of test in this example
                        // the string to use can be seen in the Smart Client dropdown
                        // Other fields could be filled out, e.g. objectList
                    };
                    EnvironmentManager.Instance.SendMessage(new VideoOS.Platform.Messaging.Message(MessageId.Server.NewAlarmCommand, alarm));
                    Logger.Log($"Fired point alarm on point Nb {settings.PointNumber}" + (settings.IsAddressable ? $", Addr= { settings.AddressableNumber}" : ""));

No, the information about the map displayed in the Alarm Preview is no in the Alarm object but in the Alarm Definition only.

Observations that might prove useful:

If you submit an Alarm with the Message field fitting an Alarm Definition setup, the Map configured in the Alarm Definition is displayed in the Smart Client Alarm Manager.

If you have alarms showing a certain map in the Smart Client Alarm Manager, then you can change the Map shown by changing the Alarm Definition. The change in the Alarm Definition will be reflected even in past alarms.

Thanks Rie, we will confirm if we can use it this way. We are testing to see if the cameras that we associtate to the event will show up in the Smart Client if a given alarm definition has no associated cameras. If it does, it will be the difference between creating a few alarm definitions vs a few hundred :confused: