Is it possible to remove overrides on alarm properties in UDT instances thru scripting?

I've wrote a tag change script that runs in a child UDT that will iterate thru a UDT and change all the alarm priorities to Diagnostics. Then write a record of the old alarm.priority values to another tag to hold on to. Then I was working on the bit to write the old values back.... But, now I've gone down the rabbit hole of trying to figure out how to just remove overrides and set back to default which would allow me to forgo trying to save the old original priorities. Wondering if anyone can point out a methodology to do this. Needs to only revert alarm properties and support tags with multiple alarms. Appreciate any guidance.

An override for an alarm is all or nothing. If you look in the tag editor, the override indicator is next to the alarm, not each property in the alarm. Tags are different.

There are some posts the describe how to programmatically remove overrides:

Ok I can switch between priorities based on a Boolean tag and tag script change....

What is weird tho... They will change from 1-4 (Low,Med,High,Critical) to 0 (Diagnostics)

But when i set them back to original (not overridden) they don't assume the new priority until they are retriggered. Is there a way thru scripting to reevaluate the alarm?

[video-to-gif output image]

Maybe disable then reenable? I haven't tried that, if I need to reevaluate I simply retrigger the alarm.

retrigger the alarm thru scripting? how?

I have tried several things as well.

system.alarm.cancel and other things

I was suggesting enabling via scripting. No, I retrigger the alarm from the source.

Perhaps circle back to the beginning post to describe in better detail what you are ultimately trying to do. There may be a better way to accomplish what you need to do.

Sure,

We have a set of child UDTs(Modbus, AB, Siemens) that goes inside of all our parent UDTs.

This common UDT provides a series of things for our apps. Its the basis of our pop up setup. Provides a loss of comms alarms, meta data, make/model/fieldnames, hostnames, alarm counting and so on.

Now we want to add a new feature. Diagnostics Mode. When a tag inside our child UDT goes 0 to 1. It iterates thru everything in the root instance and turns all alarms to diagnostics level. It also does the reverse now. By wiping out overrides. I can also do it via saving the old priorities and putting those back in. But, seeing as we discourage UDT overrides with the exception of params I prefer to do it via knocking them back to no overrides.

Ok great all that is working.

However, the alarms don't go back to their original priority WHILE triggered. They have to go low and come back to high for the change to be reflected in the alarms table.

Its odd to me they will change once while triggered but not back

I've not gone down the path of disabling and reenabling.... It would add serious overhead to my script I am afraid.

Not sure I have a suggestion for you. There is a tag AlarmEvalEnabled that might be worth trying. This looks like a single tag for all alarms. Perhaps toggling this will reevaluate.