Exporting array data
The Open Data Export Centre allows data to be exported from InfoWorks WS Pro to various 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. pump curve triplets. 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 Use report mode for arrays in the Open Data Export Centre dialog.
Use Report Mode for Arrays option checked
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 arrays 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.
Exporting to XML
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 Exporting Data to XMLfor an example.
Use Report Mode for Arrays option unchecked
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 WS Pro 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.