Exporting Array Data
The Open Data Export Centre allows data to be exported from InfoWorks ICM to a variety of formats.
It is possible to export fields from arrays via the Open Data Export Centre. Array data is the tabular data that can only be viewed in grids on an objects property sheet.
There are two types of array:
- Value - contains an array of values of a specified data type, e.g. pipe bend coordinates. When a value array is exported, all of the data values are exported.
- Structure - contains a series of data fields defining a sub-object of some sort, e.g.storage node levels and areas. You can select individual fields to export from the structure array. All the data values are then exported from the selected fields.
There are two methods of organising exported data, and these are controlled by the Use report mode for arrays check box on the Open Data Export Centre Dialog.
This method is designed for producing reports from comma or tab separated output, rather than for producing data that can be easily imported into other systems.
If the Use report mode for arrays box is checked:
- Fields from one or more arrays may be exported
- One record will always be exported, even if the chosen array(s) contain no data
- If one or more arrays contain data, then the number of records exported will equal the number of records in the array containing the largest number of records
- If you have also chosen to export top level fields for the object, these will be repeated in every record
When exporting to XML, the Use report mode operates differently:
- only one record is exported per object
- the data from the array will be exported as sub-elements. See the Exporting Data to XML topic for an example.
This is the method that would normally be used to export data to a database for manipulation, or import into another system.
If the Use report mode for arrays box is not checked:
- Only fields from a single array may be exported. If you select fields from more than one array, InfoWorks ICM will display an error message
- If the chosen array contains 10 records, then 10 records will be exported. If the chosen array contains no records, then no record will be exported. This is true even if you have chosen to export top level fields for the object (fields that are not contained in the array). Top level fields are repeated in every exported record.