Item File Format

When importing items from a text file, the format of the file is of great importance. It is also possible to simultaneously add attributes to the items. To separate item names from their attributes, and to distinguish between different attributes, we use the following file format:

The first line of the file must contain attribute identifiers, as defined in the tables of predefined Apis and OPC attributes. Each attribute ID must be separated with a tabulator. Furthermore, the first attribute ID must always be '0', since the first column in the text file must always contain the item names. The other recognized attributes are predefined OPC attributes in the range 1 - 4999 and predefined Apis attributes in the range 5000 - 5999. As an alternative to the numeric attribute ID, the attribute name is also accepted if it is spelled (case-sensitive) exactly as it appears in a property page for similar item.

From the second line and down, the actual items with their attributes follows. Each line must start with the item name, then each of the desired attributes follows, separated by tabulators. Each line must contain exactly the same number of values separated by tabulators in order to successfully import item from the file. I.e., the lines in the file must have an entry for each of the attribute IDs included in the first line in the file. Each attribute entry must be separated with a tabulator.

See OPC DA Item attributes and Predefined Apis attributes for a list of valid attributes and their IDs / names.

Some Apis attributes have enumerated values, e.g. you may select between a predefined list of attribute values. Confer the list of enumerated values and matching integers in order to configure these attributes from a file.

An example file adding three items with the OPC attributes description (100) and engineering unit (101) and Apis attribute Location (5012), will then be as

follows, each column separated by tabulators:

01011005012
BoilerTempThe temperature of main boilerCBoiler room 1
BoilerFlowThe flow though main boilerm^3/sBoiler room 1
BoilerVolumeThe volume of main boilerm^3Boiler room 1

If some of the items in the file doesn't have a specific value for one or more of the attributes defined in the first line, simply enter two tab characters to skip the attribute.