Hi,
When creating a memory tag with datetime datatype through script it seems that I can’t set the value?
Running the code below makes the tag, but the value is None.
Is it possible to set the value to a certain date?
def makeTag(path):
tag = {}
tag.update(name = 'DateTag')
tag.update(dataType = 'DateTime')
tag.update(value = system.date.getDate(2050,0,1))
tag.update(formatString = 'yyyy-MM-dd h:mm:ss aa')
tag.update(valueSource = 'memory')
tag.update(executionMode = 'TagGroupRate')
print system.tag.configure(path,[tag],'o')
makeTag('TestFolder')
Next issue is editing a memory tag with datetime datatype.
When running the code below the value of the tag is set to None even when having a date as value before the edit. By chosing ‘m’ for collision policy the operation shouldn’t override any of the other tag properties?
Is it possible to run the system.tag.configure function without nulling the value?
def editTag(path,tag):
conf = system.tag.getConfiguration(path+'/'+tag)
conf[0]['tagGroup'] = 'Default'
system.tag.configure(path,conf,'m')
editTag('TestFolder','DateTag')
Thanks