Get the alarm properties (primarily enabled) of a tag from scripting

I’m trying to get properties of every alarm on a given tag. I currently have a script that uses system.tag.getAlarmStates on a path, goes through the tagDefinition properties and gets those properties, or uses the default if they aren’t there. The problem is, that returns the binding, not the actual value. This is mostly a problem for the enabled property, as we don’t really use bindings for the other needed properties.

As far as I can tell, you can’t get the true enabled property value. It feels like it should be a simple thing, but I’m at a dead end here.

The way I have understood the properties is if they don’t return on a system call or aren’t present in a tag export then they can safely be assumed to be default value. Which in an alarms case would be TRUE.

I just tested this below and it returned the FALSE value on an alarm I disabled to test it.

tagDefs = system.tag.getAlarmStates("Test/TestALMTag")
for tagDef in tagDefs:
    for prop in tagDef.getAlarmProperties():
    	if == 'enabled':
    		print tagDef.alarm,, prop.type, prop.value

Thats my understanding too, and did my own tests that show that as well. The problem is, if the “enabled” property is bound via expression or something, that binding is what is returned, NOT the evaluation of it. We happen to use a binding on the enabled property a lot, so unfortunately it isn’t feasible to do it this way.