How to send custom alarms from within a MIP plugin?

I used the code in the sample LibraryEventGenerator to send an alarm from within a MIP plugin. Alarms sent via LibraryEvenyGenerator show up in the smart client, however, alarms sent via the plugin do not, and it is the same code

public void sendAlarm()
        {
            Item _item = null;
 
            ItemPickerForm form = new ItemPickerForm();
            //  form.CategoryFilter = Category.TriggerIn;
            form.AutoAccept = true;
            form.Init(Configuration.Instance.GetItemsByKind(Kind.TriggerEvent));
 
 
            if (form.ShowDialog() == DialogResult.OK)
            {
                _item = form.SelectedItem;
            }
 
            if (_item == null)
            {
                MessageBox.Show("Please select an Item first...");
                return;
            }
 
 
            FQID f = _item.FQID;
            f.ParentId = Guid.Empty;
            EventSource eventSource = new EventSource()
            {
                //FQID = _item.FQID,
                FQID = new FQID(_item.FQID.ServerId, _item.FQID.ParentId, _item.FQID.ObjectId, _item.FQID.FolderType, _item.FQID.Kind),
                Name = _item.Name
            };
            EventHeader eventHeader = new EventHeader()
            {
                ID = Guid.NewGuid(),
                Class = "NewEventToRule",
                Type = "type",
                Timestamp = DateTime.Now,
                Message = "message",
                Name = "name",
                Source = eventSource,
                Priority = 2,
                PriorityName = "Medium"
            };
            Alarm alarm = new Alarm()
            {
                EventHeader = eventHeader,
                StateName = "In progress",
                State = 4,
                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
            };
 
            // Send the Alarm directly to the EventServer, to store in the Alarm database. No rule is being activated.
            EnvironmentManager.Instance.SendMessage(new VideoOS.Platform.Messaging.Message(MessageId.Server.NewAlarmCommand) { Data = alarm });
 
        
 
 
        }

It should work the same way for Smart Client plugins. Try see if any log messages have been written into the Smart Client or Event Server log’s. Note that Smart Client logs are disabled by default (modift client.exe.config to enable)

Thanks Anders, However, I am referring to a management plugin. The code was plugged into the VideoPreview sample in the Plugin samples. I am expect to trigger the alarm from the management plugin and see the alarm log in the smart client. Regards, Rana Morsi Software Engineer AvidBeam Technologies

any idea why it might not be working from a management plugin?

Any updates as to how to resolve this issue?

Thanks!