Export and update tag values

Export the values tags held at a point in time, and write values back to many tags from a CSV.

Importing and exporting tags moves a project’s configuration. This page is about moving the values — taking a snapshot of what tags read at a chosen moment, and writing values back to many tags at once from a file.

Together they’re the practical way to capture and restore a working setup: export the values a plant held while it was tuned correctly, and write them back after a controller has been swapped or a set of set points has drifted.

Exporting tag values

The export produces a CSV of what each tag read at a point in time you choose — not right now. The value for each tag is its most recent recorded value at or before that moment, taken from the tag’s history.

Starting an export

From the Tags view:

  • For a whole folder — open it and choose More → Export → Tag values. Everything below that folder is included.
  • For part of one — select the tags, devices, or folders you want, then Export → Tag values from the selection’s actions.

Choosing the moment

The export dialog asks for a Date and a Time — it must be a moment in the past. Under Tags you choose the scope:

  • All — every tag in the selection.
  • Only writable — just the writable ones. Use this when the point of the export is to write the values back later: a read-only tag can’t be restored, so including it only adds rows that will be rejected on the way in.

History available then shows how many of those tags actually have a value at that moment, as N of M. Expand More info to see them listed under No value and Has value, so you can tell whether it’s one stray tag or half the plant before you commit to the time.

Incomplete data

If some tags have no recorded value at the chosen time, exporting raises an Incomplete data warning listing exactly which ones, and offers a choice: go back with the dialog’s back arrow and pick another time, or export anyway. Exporting anyway writes those tags out with a value of null.

A tag can be missing a value for good reasons — it didn’t exist yet, its history was off, or the plant was down. Usually the right move is to pick a time when the system was running normally.

The file

You get a CSV named after the project, with two columns:

Tag Path,Tag Value
Building A/AHU01/SF01/PV,21.4
Building A/AHU01/SF01/SP,22

That’s the same shape the value update below expects, so an export drops straight back in.

Updating tag values from a CSV

This writes values to tags — it changes what the plant is doing, not just what THMI records.

Starting an update

Select the tags you want to update, then Update values → CSV from the selection’s actions. From the Tags root you can also use More → Update values → CSV to target everything in the project. It isn’t offered inside a subfolder — select the tags there instead.

The selection matters: only tags you selected are updated. Rows in the file for anything else are ignored. That’s the safety net — you can hand over a file covering a whole plant and still update just one air handling unit with it.

The file

A .csv file with two columns, Tag Path and Tag Value:

Tag Path,Tag Value
Building A/AHU01/SF01/SP,22
Building A/AHU01/RF01/SP,21

The header row is optional — a file that starts straight into data works too. If you include one it has to read Tag Path and Tag Value, though capitalization and surrounding spaces don’t matter. A first line that looks like anything else isn’t rejected; it’s treated as a data row, and then simply matches no tag. Tag paths themselves are matched exactly against the selected tags’ paths.

A file is rejected outright if it isn’t a .csv, if it’s empty or has nothing but a header, if it lists the same tag path twice, or if none of its rows match anything you selected. The duplicate-path error doesn’t name the offending paths, so if you hit it, sort the file by path and look for the repeat.

What happens

Upload the file and choose Import. THMI matches the rows against your selection, validates each value, and starts writing. Each value has to pass on its own:

  • the tag must be writable;
  • the value must suit the tag’s data type — a number for a numeric tag, a boolean for a boolean one, a whole number for an integer;
  • it must be inside the tag’s data type range and its write limits.

Values that fail are reported rather than written; the rest go through. If nothing in the file is valid for the selection, you’re told there’s nothing to update and no writes happen.

Writing runs in the background and you get the results by email when it finishes. The dialog confirms it’s been accepted and then you can close it — you don’t have to wait, and closing it doesn’t cancel the write.