Export Data Table
This tool can be used for exporting a data table from any data in your model. In the exported data table objects are rows and properties are columns. Simplebim has also other ways of exporting data as a table, such as Bimsheet and the Table palette, but this tool is designed to be more robust. When you use data for data analysis, and especially when you automate updating the data or collect history data, it is of utmost importance that the format of the data stays consistent. In order to ensure consistency this tool uses a separate configuration file that is never modified by this tool. This means that as long as your configuration file stays the same, the format of the exported data table stays the same. Always.
The recommended way to use this tool is together with model normalization. When you normalize a model you add your own property set to the model – the same property set to all objects. Then you populate the properties in your property set by copying and deriving information from the model and by enriching from external data sources. In this scenario your data table is one big table that contains all your objects and all properties from your own property set. This is the most practical input for data analysis, because it ensures that all your models have the same properties and it frees you from the object class, which is most often irrelevant for data analysis. The object class can be one of the properties in your property set, so you can still use it in the special cases where it might be useful.
This tool can add a GUID (globally unique ID) and timestamp column to the data table. The GUID is used for identifying the object in the model. You would use it for example when you want to link your analysis back to the model for visualization purposes. The timestamp is the timestamp of the model. Together the GUID and the timestamp make it possible to manage versions of the same object in your data repository and analysis.
The configuration file for the data table is a simple ASCII file that you can create and edit with Notepad. It has two sections: one for the units and another for the columns.
#Units
m
m2
m3
kg
The units are defined simply by giving the unit symbol. For example ‘m’ can only be a unit for length, so there is no need to specify this separately. Defining the units is important because if you have models with different units, your analysis would be incorrect if the units are not normalized across all models in the data table.
#Columns
IFC:F:IF:MYPSET:MY FIRST PROPERTY:STRING My First Property
IFC:F:IF:MYPSET:MY SECOND PROPERTY:STRING My Second Property
The columns are defined in the order they appear in the data table. The GUID, Timestamp and GUID+Timestamp properties appear, if needed, before any of the other columns. For each column you define the key of the property and the name of the property. They key and name are separated by a tab -character. The key is used for finding the property from the model and the name is written to the data table. If no property with a given key is found from the model, then an empty column with the given name is still added to the data table.
User Interface
Run the ‘Export Data Table’ -tool from the ‘Run Tool’ -menu in the ribbon ‘Home’ -tab. When you hover with the mouse pointer over the different options a tooltip with helpful explanations is shown.
Template and Script
When you run the tool from a template or script, use the configuration options below to get the desired result.
Rows
Key | Type | Value | Description |
---|---|---|---|
OBJECTS | Text | Default = ALL | The data to be exported. The value can be an object group name, object class name or one of predefined values below. |
<Object Class Name> | for example: Wall | ||
<Object Group Name> | for example: Your Group Name | ||
ALL | All stand-alone objects, all assemblies and all parts | ||
ASSEMBLIES | All stand-alone objects and all top level assemblies, no parts. | ||
PARTS | All stand-alone objects and all parts, no assemblies. |
Columns
Key | Type | Value | Description |
---|---|---|---|
CONFIGURATION_FILE | Open File | The full path including file extension for the configuration file. | NOTE: The export will fail if this configuration is not given. In this case a message will be written into the log if logging is enabled. |
REPLACE | Text | Find and replace in the configuration file. | For example: [PSET]=Acme |
ADD_GUID | On/Off | Default = ON | Add a GUID (Global ID) column as the first column |
ADD_TIMESTAMP | On/Off | Default = OFF | Add a Timestamp (date and time) column as the first column. The timestamp is the timestamp of the model. |
ADD_GUID_AND_TIMESTAMP | On/Off | Default = OFF | Add a first column that combines the GUID and the Timestamp. |
Format
Key | Type | Value | Description |
---|---|---|---|
WRITE_HEADERS | On/Off | Default = ON | Write headers (property names) as the first row of the data table. |
DOUBLE_QUOTE_FIELDS | On/Off | Default = OFF | Wrap all values in double quotes. |
DELIMETER | Choice | Default = COMMA | The delimiter used for separating the fields. |
TAB | Use tab as the delimiter. | ||
SEMICOLON | Use semicolon as the delimiter. | ||
COMMA | Use comma as the delimiter. | ||
SPACE | Use space as the delimiter. |
Output
Key | Type | Value | Description |
---|---|---|---|
RESULT_FILE | New File | Default = .csv | The file into which the data table is written. |
ENCODING | Choice | Default = UNICODE | The encoding of the result file. |
ASCII | Use ASCII encoding. | ||
UNICODE | Use unicode encoding. | ||
APPEND_TIMESTAMP | Choice | Default = NO | Append a timestamp to the file name. This is the timestamp of the model, not when the data table file was created. If you have a merged model, a separate data table file will be created for each model if they have different timestamps. |
NO | Do not append a timestamp to the file name. | ||
DATE | Append the date portion of the timestamp to the file name. | ||
DATE_AND_TIME | Append the full timestamp to the file name. |