The Export Data Table tool exports model data to a CSV file for easy use in data analysis applications, such as Power BI. The CSV file format is very popular in data processing. It is simple and thus powerful, but it also has many variations. The kind of CSV file you should create depends on your downstream solution.
In the exported data table, objects are rows and properties are columns. Simplebim also has 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 a 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.
Settings
Objects = Table Rows
Defines the objects to be exported to the data table.
Note that it is possible to export both the parents and the children of an assembly at the same time. It is also possible to export only top level of the assemblies, or only the so-called part level.
Usually you want to flatten the data hierarchies before exporting the data to tables, but it all depends on how you are planning to process or use the data in downstream solution.
Configuration File
Defines the full path and name, including file extension, for the configuration file.
Type in the path and name, or click on the three dots to select the file with the File Selector dialog.
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.
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
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.
Here's an example of the units section in the file:
#Units
m
m2
m3
kg
Columns
For each column, you define the key of the property and the name of the property. The 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.
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.
If no property with a given key is found in the model, then an empty column with the given name is still added to the data table.
Here's an example of the columns section in the file:
#Columns
IFC:F:IF:MYPSET:MY FIRST PROPERTY:STRING My First Property
IFC:F:IF:MYPSET:MY SECOND PROPERTY:STRING My Second Property
Find and Replace
Defines the values for find and replace in the configuration file. For example: [PSET]=Acme
This is an optional setting. Using the find and replace option, you can construct your configuration file such that it can be used in more generic way.
Add GUID Column
Defines whether to add a GUID (Global ID) column as the first column.
Add Timestamp Column
Defines whether to add a Timestamp (date and time) column as the first column. The timestamp is the timestamp of the model.
Add GUID+Timestamp Column
Defines whether to add a first column that combines the GUID and the Timestamp.
Write Headers
Defines whether to write headers (property names) as the first row of the data table.
Double Quote Fields
Defines whether to wrap all values in double quotes. Some solutions that read CSV require this, others don't.
Delimiter
Defines the delimiter used for separating the fields. The delimiter you should use, depends on your downstream solution.
Tab
Use tab as delimiter.
Semicolon
Use semicolon as delimiter.
Comma
Use comma as delimiter.
Space
Use space as delimiter.
Result File
The full path and name of the file into which the data table is written.
Type in the path and name, or click on the three dots to select the file with the File Selector dialog.
File Encoding
Defines the encoding of the result file. Which one you should use, depends on your downstream solution.
ASCII
Use ASCII encoding
Unicode (UTF-16)
Use unicode encoding.
Append Timestamp (to file name)
Defines whether to append a timestamp to the result 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 Only
Append the date portion of the timestamp to the file name.
Date and Time
Append the full timestamp to the file name.
Decimal Separator
Defines the decimal separator for numeric values. Which one you should use, depends on your downstream solution.
Region
Use the separator used in the Windows Regional Settings.
Dot
Use the dot character.
Comma
Use the comma character.
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. | ||
| DECIMAL_SEPARATOR | Choice | Default = REGION | The decimal separator for numeric values. |
| REGION | Use the separator used in the Windows Regional Settings. | ||
| DOT | Use the dot character. | ||
| COMMA | Use the comma character. |
Related to
Comments
0 comments
Please sign in to leave a comment.