Jump to content

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

KeyTypeValueDescription
OBJECTSTextDefault = ALLThe 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
ALLAll stand-alone objects, all assemblies and all parts
ASSEMBLIESAll stand-alone objects and all top level assemblies, no parts.
PARTSAll stand-alone objects and all parts, no assemblies.

Columns

KeyTypeValueDescription
CONFIGURATION_FILEOpen FileThe 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.
REPLACETextFind and replace in the configuration file. For example: [PSET]=Acme
ADD_GUIDOn/OffDefault = ONAdd a GUID (Global ID) column as the first column
ADD_TIMESTAMPOn/OffDefault = OFFAdd a Timestamp (date and time) column as the first column. The timestamp is the timestamp of the model.
ADD_GUID_AND_TIMESTAMPOn/OffDefault = OFFAdd a first column that combines the GUID and the Timestamp.

Format

KeyTypeValueDescription
WRITE_HEADERSOn/OffDefault = ONWrite headers (property names) as the first row of the data table.
DOUBLE_QUOTE_FIELDSOn/OffDefault = OFFWrap all values in double quotes.
DELIMETERChoiceDefault = COMMAThe delimiter used for separating the fields.
TABUse tab as the delimiter.
SEMICOLONUse semicolon as the delimiter.
COMMAUse comma as the delimiter.
SPACEUse space as the delimiter.

Output

KeyTypeValueDescription
RESULT_FILENew FileDefault = .csvThe file into which the data table is written.
ENCODINGChoiceDefault = UNICODEThe encoding of the result file.
ASCIIUse ASCII encoding.
UNICODEUse unicode encoding.
APPEND_TIMESTAMPChoiceDefault = NOAppend 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.
NODo not append a timestamp to the file name.
DATEAppend the date portion of the timestamp to the file name.
DATE_AND_TIMEAppend the full timestamp to the file name.