Set `historyEnabled` through scripting

Hi ,

I’ve found out the system.tag.browse has the historyEnabled variable.
https://docs.inductiveautomation.com/display/DOC81/system.tag.browse

I’m wondering how can I set the variables state through scripting.

You can simple write to the HistoryEnabled property directly:

tagPath = "Path/To/Tag"+".HistoryEnabled"
system.tag.writeBlocking([tagPath],[True])

Check out: https://docs.inductiveautomation.com/display/DOC81/system.tag.writeBlocking
For more info on the script function.

2 Likes

Thanks Brandon!

Worked like a charm