Importing block models

You can add block models to BlockSync by:

  • Publishing a block model from an integrated app
  • Uploading a block model file in the BlockSync portal in *.csv, *.parquet or *.dm (Datamine) formats

This topic describes the process for uploading a new block model to the BlockSync portal and for uploading updated versions. It is divided into:

Once a block model has been uploaded to BlockSync, its grid definition cannot be changed. If you later need to upload a version of the model that has a different grid definition, you will need to upload it as a new model.

Importing a new block model

In the BlockSync portal, importing a new block model is divided into four main steps:

  1. Selecting the source file
  2. Entering grid information
  3. Choosing the columns to import and specifying the type of column
  4. Finalising the import

To start importing a block model, click the Import Block Model button in either the block models list or in a workspace.

Selecting and previewing the block model file

In the window that appears, click the Upload file button to select a file and a grid definition file, or simply drop the files onto the designated space:

If you do not include a grid definition file, you will need to enter the grid definition manually in the next step.

Once you select a file for upload in the first step, the time required to move on to the second step depends on the file size. Once the file has been uploaded, the data in it will be previewed:

Check the preview carefully, especially the first few lines. If there is a notification regarding skipped rows, follow the prompts to verify that you wish to skip those rows.

Once you have checked the preview, click Next step to define the grid.

Parsing the grid definition (Datamine files)

When importing block models in Datamine (*.dm) format, once you click Next step, the file will be parsed to extract the grid definition. Progress is displayed at the bottom of the window:

If you want to enter the grid definition manually, you can move on to that step by clicking the Skip parsing button.

Entering block model details

Choose a workspace for the block model, then enter a name and description.

If you included a grid definition file or are uploading a Datamine block model and it was parsed in the previous window, the block model type and all parameters will automatically be set. As the grid definition cannot be changed once the block model has been uploaded to BlockSync, carefully review the information before moving on to selecting columns.

If you need to enter the grid definition manually, select the block model type. This will display a set of fields later in this window for entering grid definition information.

Specify the block size unit, in metres or feet.

For the CRS, if the workspace has a CRS specified, that will be used for the block model, unless you change it in this window.

In you do not need to edit the grid definition, click Next step to view the columns in the file and choose which ones you wish to import.

Entering the grid definition manually

If you need to enter the grid definition manually, scroll to the bottom of the window to enter the required information.

The fields displayed depend on the type of block model selected earlier in this window. You can use the Tab key on your keyboard to tab through the fields. It may be useful to have the file open in a text editor to ensure the details match those you enter here.

The model rotations supported are:

  • No rotation
  • Custom rotation, listed in the order in which the rotation is applied to the block model. Clockwise is positive.
  • Leapfrog rotation, expressed in azimuth, dip and pitch
  • Vulcan rotation, expressed in bearing, dip and rake

Click Next step to view the columns in the file and choose which ones you wish to import.

Sub-block infilling (fully sub-blocked and octree sub-blocked models)

If you are uploading a fully sub-blocked or octree sub-blocked model, there will be an option for sub-block infilling in the Select columns window. This setting determines how the block model will be updated when new sub-blocks are created for which there is no data. See the Sub-block infilling topic for more information on this setting. If you need to change this setting after the block model has been uploaded, you can do so in the block model’s Configuration tab.

Choosing columns

When uploading a new block model to BlockSync, the final step is to choose which columns in the source file you wish to upload to BlockSync.

On import, BlockSync will apply an action to each column in the file. At this stage, BlockSync autodetects the most likely action for each source file column based on its name and contents. These actions are:

  • The Grid definition action is assigned to columns that have a name that matches terminology often used for grid definition columns. These are columns BlockSync requires in order to validate and import the grid. You cannot change these column names, but you can change which source file columns are assigned as the different grid definition columns.
  • The New column action is for data columns, which will be marked as text or numeric, depending on their contents. You can change the names of these columns; each name must be unique and cannot be the name of one of the grid definition columns.
  • The Don’t import action is for columns you do not wish to import.

The table in the Select columns window displays each column from the file (A), along with the actions (B) that will be applied to each column when BlockSync validates and imports the file. The table also shows the column name used in BlockSync (C) and its Data type (D), if the column is not a grid definition column.

BlockSync defaults to assigning an action to all columns in the file, and so initially, no columns will be assigned the Don’t import action.

The Default to “Not imported” button near the top of the window marks all columns as Don’t import, which means that you will then need to map each column one-by-one, including the grid definition columns.

Beware that clicking the Default to “Not imported” button cannot be reversed. You will then need to map every column one-by-one, and it may, in fact, be more practical to set each unneeded column to Don’t import instead of having to remap all columns in the file.

Here we can see some of the data columns that have been assigned the New column action (E). Each column has been autodetected as a Text column (F), but if we can see from the file itself that it contains numeric data, we can change it using the dropdown list.

The icon next to Text in the dropdown list (G) indicates that this is the setting BlockSync autodetected.

Note that the Data type cannot be changed for *.parquet files.

Once you have finished choosing columns, click Next step to validate and import the model.

Finalising the block model import

Once you have chosen which columns will be imported and set their actions, click Import to start validating the model, which results in the block model being saved to the designated workspace. Progress is displayed in the Summary window (A) and in the task queue (B):

This process involves validating every block/row to ensure that it matches the model definition and that there are no errors such as overlaps, duplicates or gaps between blocks.

Once the file has been processed, a summary will be displayed.

If there are errors, use the summary displayed to troubleshoot. Use the Back button to step back to the point that may be the source of any errors.

Uploading a new version

Uploading a new version of a BlockSync model is similar to importing a new block model, except that you do not need to enter the grid definition.

A BlockSync model’s grid definition cannot be edited. If you need to upload a version of the model that has a different grid definition, you will need to upload it as a new model.

There are two ways to start uploading a revision to an existing block model:

  • From the Block models list
  • From the block model’s Versions tab

From the Block models list, click on the overflow menu for the model you wish to update and select New version:

From the Versions tab, click the Upload new version button:

In both cases, the Import new version wizard will guide you through the steps. Start by clicking the Upload file button to select a file, or simply drop the file onto the designated space.

Once the file has been uploaded, the data in it will be previewed. As with uploading a new model, check the preview carefully, especially the first few lines. If there is a notification regarding skipped rows, follow the prompts to verify that you wish to skip those rows.

Click Next step to move on to selecting the columns that will be imported.

At this stage, you are required to enter a comment on this version of the block model.

As when importing a new block model, BlockSync automatically assigns any new columns to the most likely data type. Any columns new to this version are labelled with the New column action, while existing columns are labelled with the Update column action. For example, here there is one column that is new to the block model and two existing columns that will be updated:

If you do not wish to import one of the new columns or update an existing column, click the action button for that column and select Don’t import.

The Default to “Not imported” button near the top of the window marks all columns as Don’t import, which means that you will then need to map each column one-by-one, including the grid definition columns.

Rename non-grid columns, if required, by entering a new name in the Import name box.

Once you have finished making changes, click Import.

You may be prompted to specify whether the file being uploaded represents part of the model or the whole model:

Click Update to start uploading the new version of the model.