What is the preferred way to put a comment in an alarm without acknowledging it from an Automation Script?
I remember I saw something similar with Engine.SLNet.SendMessage(SetAlarmStateMessage)
Can't find any info about this in the docs.
Hi Peter,
The reason it didnt work with the alarmTreeID overload is because the Info property was not set. This still necessary for legacy reasons.
This should do the trick:
var comment = "Hello world";
engine.GetUserConnection().HandleSingleResponseMessage(new SetAlarmStateMessage(new AlarmTreeID(1, 2, 3), AlarmUserStatus.Comment, comment)
{
Info = new SA(new string[] { "-1", comment }),
});