Defining multiple tags for use in a script for a button on an action

Hi All,

Just general enquiry on what the best way to go about this is. I'm having issues with a script which has let me to this question.

If i need write to say 8 tags from a UDT in a script do you bring them in as

tagPath = ['Mytag/TestTags/Tag1', 'Mytag/TestTags/Tag2', 'Mytag/TestTags/Tag3'] #pretend this went on to 8.
values= [True, False, False]

system.tags.writeAsync(tagPath, values)

Or do you bind them as custom params to the button? And reference them this way? Is there issues trying around this?

Use the scripted write with multiple paths/values at once. This will become a very efficient combined write at the driver level. Writing to bidirectionally bound properties each generates a single write. That should be avoided.

1 Like