system.tag.editAlarmConfig on UDT

Hi all
I am playing around the function system.tag.editAlarmConfig to see if I can speed up ad massive update of my UDTs avoiding any manual activity.
I am able to use it on the UDT istances like this:

tagsPath=["_testTagForAlarm/Expressions/testTagForAlarm"]
alarmConfig={"TestAlarm 1":[["CustomAssociatedData1","Value","12345"],["Notes","Value","6789"]]}
system.tag.editAlarmConfig(tagsPath, alarmConfig )

It's working properly but I don't want to work at UDT instance level but at UDT level.
In try to use it with UDTs by simply replacing the tag path with the UDT path and it's not working.
Is there a kind of restriction on using this function with UDTs?
Eventually is there another way to add/modify (or even simple write a value) directly into an associated data of an alarm into a UDT?
Thank you

I’m looking to do the same thing. I’ve tried:

tagPaths = ['_types_/Devices/PowerFlex_ENetDNet/Alarms/VSD Fault']
config = {'EXAMPLE':[['name','Value','bob']]}

system.tag.editAlarmConfig(tagPaths=tagPaths, alarmConfig=config)

Where Devices/PowerFlex_ENetDNet is the path to the UDT, but nothing happens; no errors, no changes :frowning:

@PGriffith or @Kevin.Herron , is this possible: can we bulk edit UDT alarm definitions via scripting?
I’m using 7.9.14
Is this possible in v8?

I wouldn’t expect it to work in any version. When editing a UDT instance, you are editing actual tags. The UDT itself is just a definition that tells the system what properties and attributes a tag should have when it is created.

It really would be great if Inductive added a way to modify UDTs via scripting though.

UDT instances are by definition not that place where you should be modifying tag properties though, unless it’s fundamental to the UDT (e.g. the units and ranges for an analogue transmitter).

At any other time though, the UDT definition is where any property changes should be made, so it would certainly make sense for these to be bulk-editable via scripting. Alternatively, I will need to export the definition and fight with VBA in excel to get something together to make these bulk changes. I’d really prefer not to go down that path though, when editing these could be as easy as a couple of lines of Python code

I agree completely. My point was just that I wouldn’t expect functions in the system.tag library to be able to edit UDTs. What we need is a system.UDT library. :crossed_fingers:

2 Likes