The CSV Import can be used to populate iCD objects with data available in a CSV file matching values to the correct object and corresponding attribute.
Expected CSV format
In order for the import to assign the data in the CSV file to the expected attribute of the expected object the CSV file should be formatted or organised in a certain way:
4. Each column in the CSV file must hold the values to be imported to the same iCD attribute
5. Each row in the CSV file should hold the values to be imported to the same building or group of buildings
6. The first row holds the columns’ headers.
7. One of the columns in the CSV should hold values that will be used as a match key.
The Figure 4-65 below presents a generic example of the expected CSV format for an iCD import.
Figure 4-65 CSV generic format
In this example, the column A holds the match keys. In reality, it is possible to identify any columns in the CSV file as the Match Key (see example in the later steps).
Columns B to F are listing all the values available in the CSV file that could be imported to the iCD model.
Example
Consider the iCD model below (Figure 4-66) in which we have a set of buildings. The name of each building has already been populated and can be used as a match key.
Figure 4-66 Example of a model before a CSV import
The below CSV (Figure 4-67) contains the data we wish to import to our model. Note that column A contains each of the building’s names and therefore allows each row to be matched to the right building in the iCD model. The other columns contain the data we wish to import into our CSV model: Number of storeys, primary use, storey height, UPRN and Wall U-values.
Figure 4-67 Example of a CSV file to be imported
Selecting a CSV file
In the iCD tool bar, click the CSV import icon to open the CSV import dialog. Alternatively, you will find the CSV import by going into Extensions > IES iCD > Import/Export > Import CSV.
In this first dialog (Figure 4-68), the user is asked to select the CSV file to import data from. This can be done through browsing for the file or by dragging and dropping the file into the dialog
Figure 4-68 CSV import - File selection
Once the file is selected, the user is navigated to the next step.
Select Match Key
At this stage the user is asked to select the match key to be used to map CSV rows to the right iCD objects. The user needs to:
1. Select the columns in the CSV to be used as a match key in the “Select your CSV match key” dropdown
Select the option within the available columns in the CSV file. It is possible to type the first few letters to help find the right column.
Below is shows the list of available columns for the example mentioned above.
2. Select the targeted iCD attribute to be matched against in the “Select your target iCD attribute” dropdown.
This is done using the “Select your target iCD attribute.
It is possible to type the first few letters to find the attribute.
Based on the example presented above, the Name column in the CSV is used to make a match with the values available in the Name attribute in the iCD model (see below Figure 4-69).
Figure 4-69 CSV import - Match key selection
Match preview
At this stage the user can preview the results of the match set at the previous stage and see which objects in the iCD model are targeted by each row in the CSV file (see below Figure 4-70).
Clicking the “Highlight in model” icon highlights the matched objects in the iCD model for the user to be able to identify them in the model.
Figure 4-70 CSV import - Match preview
Attribute mapping
At this stage, the user needs to indicate to which attribute in the iCD model each CSV column should be imported to.
This process is broken down in 3 steps materialised by 3 fields to fill.
1. Import As
The user needs to indicate whether they want to import the data in the column to an existing attribute or import them into a new custom attribute (creating this new custom attribute as part of the process)
2. Attribute Name
Identify the attribute they wish to import the data to.
If importing the data into an existing attribute the user then needs to select which attribute they wish to import the data to.
If importing the data into a new custom attribute, the user needs to define the name of the custom attribute created as part of the import
3. Data format
Finally, the user needs to indicate the format of the new custom attribute created. If the column is imported to an existing attribute no action is required and the format of the existing attribute is indicated in this field
Important note: if a column’s header in the CSV file has the exact same name as an existing iCD attribute, iCD will automatically map this column to the existing iCD attribute with the same name.
Mapping status
Once the user has defined the desired attributes mapping the status indicates how much of the data will be imported based on the defined attribute mapping
- Green “all data are valid”. All data in the CSV columns are valid to be imported to the targeted attributes
- Amber “X values out of Y are invalid”. This indicates that some data within the CSV column may not have the right format (or are out of range) and won’t be imported into the targeted attribute
- Red “No Valid data”. None of the values in the CSV column are valid to be imported into the targeted attribute
CSV preview
If the mapping status is showing a red or amber status, the user may want to investigate further which values are not fit for import to the selected attribute by clicking the CSV preview
Ignore
Ticking the ignore tick box for a column will ignore this column and not import any data in it.
In the example shown in Figure 4-71 below (based on the CSV example described above) the goal is to import the following data:
- Data in column “Num of storeys” into the existing attribute “Number of storeys”
- Data in column “Primary use” into existing attribute “Primary use”
- Data in column “Storey height” into existing attribute “Building storey height”
- The column “UPRN” is ignored and the data in this column won’t be imported to iCD
- Finally, the column Wall U-value into the existing attribute “Construction type”
Figure 4-71 Example of attribute mapping
Clicking the “Review CSV” button gives an overview of the CSV file and the validity of its data based on the current attribute mapping
See the example below (Figure 4-72):
- One entry in the “Primary use” column is misspelled and is not valid for import into a list attribute like the Primary use. The invalid value appears in red. This corresponds to the amber status in the attribute mapping dialog.
- One of the entries for “Num of storeys” is a decimal number and is not valid to import into an integer attribute. The invalid value appears in red. This corresponds to the amber status in the attribute mapping dialog.
- The column UPRN is ignored and appears greyed out.
- Finally, the column “Wall U-value” is mapped to the “Construction type” attribute. All the values are numbers and are not valid for import into a list attribute. The entire column appears in red. This corresponds to the red status in the attribute mapping dialog.
Figure 4-72 Review CSV
Once the attribute mapping is complete, the user can click import to start the import
Import completion
Once the import is complete the dialog indicates the total number of values that have been imported to the iCD model (see Figure 4-73). At that point the user can close the dialog and proceed with their model.
Figure 4-73 Import completion dialog
Here below is an overview of the updated model once the import was completed.
Figure 4-74Example of the model after import