Tag export Script for just the UDT definitions?

Been following the Ignition Deployment Best Practices for roughly a year now and with the upgrade to 8.1 noticed the ability to export the tags and that UDT definitions separately from the designer but I do not see a way to do this with the system.tag.exportTags function in the manual.

The capability to export or import these separate would be useful for our DEVOPS deployment to make more real time updates without overwriting the the tag values on the plant floor and getting my random garbage test work orders to overwrite what they have already entered… I’m still working on automating the process of the Git merge/promotions etc. in combination with our sepasoft changes but making the tags a simple process to autosave into the projects folder, commit and pass up to the production system to be imported and have the UDT’s auto pick up would be very valuable.

Have you tried it with the paths _types_? This is their root folder

@nminchin Thanks for that tip, that does the functionality I was looking for.

I adjusted the code in the Deployment Best Practices guide from

import time
filePath = “/var/lib/ignition/data/projects/tags.json”
system.tag.exportTags(filePath=filePath, tagPaths=["[default]"])
time.sleep(5)
system.util.execute(["/var/lib/ignition/data/git-auto-commit.sh"]
)

to

filePath = “/opt/ignition/data/projects/tags.json”
system.tag.exportTags(filePath=filePath, tagPaths=["[default] _types_"])

Just an fyi, y’all may want to update the Guide since some of the paths referenced for linux installs aren’t used any more with 8.1, with the transition happening somewhere around 8.0.9.

1 Like