Table of Contents

Add Datapoint

The Add Datapoint verb can be used to manually add data to any Units database. If the Unit is not already in the Database it will be created. This allows you to create databases that do not have a corresponding Unit in XTension.

Usage:

Instead of the Unit Name you can pass an applescript list with name/value pairs in it to add several values to different databases, See the example below.

The Unit does not need to be a Unit actually in XTension. You can use this method to create databases for values or items that are not part of the XTension database.

Note that you cannot specify the date of the value when using this verb. Any data added via this verb will be added with the current date.

Examples:

tell app “XTdb” to AddDatapoint “my temperature sensor” value 97.6

Use an AppleScript list to add datapoints to several databases at once. Leave out the value when using a list.

tell app “XTdb”
  AddDatapoint {“sensor 1”, 75,2 “sensor 2”, 34.6, “fridge temp”, 38.4}
end tell