# system.tag.addTag() and PyDictionary alarmConfig

**URL:** <https://forum.inductiveautomation.com/t/system-tag-addtag-and-pydictionary-alarmconfig/9763>\
**Category:** Ignition\
**Created:** [March 2, 2015, 7:13pm UTC](https://forum.inductiveautomation.com/t/system-tag-addtag-and-pydictionary-alarmconfig/9763 "2015-03-02T19:13:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![low\_key](https://avatars.discourse-cdn.com/v4/letter/l/bbe5ce/32.png) [@low\_key](https://forum.inductiveautomation.com/u/low_key)\
**Post date:** [March 2, 2015, 7:13pm UTC](https://forum.inductiveautomation.com/t/system-tag-addtag-and-pydictionary-alarmconfig/9763/1 "2015-03-02T19:13:25Z")

</div>

I’m trying to add an OPC tag with an alarm via system.tag.addTag()

The example in the manual is as follows:

`system.tag.addTag(parentPath="", name="TagAlarm", tagType="OPC", dataType="Int2", 
attributes={"OPCServer":"Ignition OPC-UA Server", "OPCItemPath":"[MLX]N7:0"}, 
alarmConfig={"Alarm 1":[["name", "Value", "Alarm 1"], ["setpointA", "Value", 1.0]], 
"Alarm":[["name", "Value", "Alarm"], ["Something", "Value", "sdfsdfs"], 
["enabled", "Expression", "1=2"]]})
`

How do you find the name of the property that you want to change? In the example above “name”, “Something”, and “enabled” make sens but “setpointA” is assigned the value of “1.0” and I’m unclear where they got “setpointA” from…? How can I figure out what the other property references would be called?

---

<div class="post-metadata">

**Author:** ![low\_key](https://avatars.discourse-cdn.com/v4/letter/l/bbe5ce/32.png) [@low\_key](https://forum.inductiveautomation.com/u/low_key)\
**Post date:** [March 2, 2015, 9:30pm UTC](https://forum.inductiveautomation.com/t/system-tag-addtag-and-pydictionary-alarmconfig/9763/2 "2015-03-02T21:30:08Z")

</div>

I figured it out and I’ll put my solution here for future reference. I was able to do it with the following code:

```auto
tagDefs = system.tag.getAlarmStates("[Test]/Alarms/TestTag")
for tagDef in tagDefs:
    print tagDef.alarm
    for prop in tagDef.getAlarmProperties():
    	print prop.property, prop.type, prop.value
```

As long as the property I was looking for had something assigned to it I was able to get the property name in the output.
