Datamine Sequential Commands
(*.dm, *.dmu)
This command is not supported in Deswik.Draft.
Alter Datamine tables using a set of user-defined rules.
You can convert input *.dm files at any time to the Datamine Unicode file format by changing the
extension for output files to *.dmu. However, moving back to a *.dm file from a *.dmu file is
not advised (and will shortly be disallowed). This is because there will be a loss of data and
fidelity, and any text in the file may be corrupted in the process. For more information on the
Datamine Unicode format, see Datamine Unicode Format.
A rule is comprised of a list of user-defined commands which take an input file, alter it, and
write out an output file. The input file and the output file may be the same.
Most of the sequential commands let you view input Datamine tables using Deswik.TableViewer, a
proprietary program you can use to view and edit fields. See Deswik.TableViewer to learn
more about this View option).
This command provides a user-friendly interface to the underlying Deswik scripting library.
You can also run this command from a node in a process map. Embedding this command in a
process map lets you save your settings, so they are available each time you click the node.
This is particularly useful when multiple people use a process map to perform the same
tasks.
Instructions:
1. Click Geology | Geomodel Utilities | Datamine | Commands.
2. The Datamine Commands dialog appears.
3. To edit an existing rule, select it from the Rule list on the left side of the dialog.
OR
To add a new rule, click in the upper-left corner of the dialog. Enter a name for the
rule, or keep the default name.
When you add a new rule, all commands are automatically copied from the currently
selected rule. To use most (or all) of the settings from an existing rule, select the rule in
the list before you add a new one. Then delete any commands you do not want.
4. Use the following table to assist you with the options in this dialog.
Field Description
Commands Order: Autopopulated; the order that the command
is run in the rule.
Command: Select the command that you want to
run.
Append: Merge multiple Datamine files
together into a single file by appending
tables one after the other.
This command is not limited to block models.
It works with any 'xyz' based data file.
Field Description
Block Model Add: Combine multiple
Datamine block models into a single block
model file, 'layering' them over each other.
The resulting block model file will contain
fields from all input block models.
This command works on both unrotated and
rotated models. However, all models must
be rotated in the same way.
Block Model Boundary Change: Convert an
existing Datamine block model boundary to
a new block model boundary by splitting
block model cells at cell boundaries and
recalculating the ijk value. The resulting
block model will have a new origin, cell size
and number of cells.
Block Model Boundary Create: Create a
Datamine block model boundary file.
Block Model Center of Gravity: Generate
points at the center of gravity (COG) of each
block in a Datamine block model, and then
output these points to a layer in the active
file. Calculate the COG on groups of blocks,
as opposed to individual blocks, if required.
Block Model Coalesce: Reduce the number
of parent cells or subcells (or both) in a
Datamine block model by combining them
together.
Block Model Deplete: Deplete a Datamine
block model.
This command works on both unrotated and
rotated models.
Field Description
Block Model Fill: Generate a Datamine block
model by filling solids or surfaces. If solids
or surfaces are not available, generate a
Datamine block model with parent cells (no
subcells) using input block model boundary
properties.
This command works on both unrotated and
rotated models.
Block Model Filter: Limit a Datamine block
model either spatially or by applying a
standard filter.
This command works on both unrotated and
rotated models.
Block Model Polygon Generation: Generate
polygons from a Datamine block model.
This command works on both unrotated and
rotated models. However, processing
rotated block models will take longer.
Block Model Regularize: Regularize the cells
of an existing Datamine block model to a
selected Datamine block model boundary.
Block Model Rotate: Convert a rotated
Datamine block model to an unrotated
model, change the rotation of a rotated
model, or convert an unrotated model to a
rotated model.
Block Model Split On Elevation: Split blocks
at a defined spacing through a column.
This command is not limited to block models.
It works with any 'xyz' based data file.
Block Model Surface Generation: Generate
polyface stage or pit shell surfaces from a
Datamine block model. Generate bench
polylines from output pit shell surfaces.
Field Description
Block Model Validate: Validate an existing
Datamine block model.
Block Model Volume: Calculate the volume
of a block inside, above or below a polyface
or polyfaces, and then write the results to a
volume field in a selected Datamine block
model.
Compare Block Models: Compare one
Datamine file to another to ensure that the
number of records (excluding headers) are
equal, and the content of each cell matches
the equivalent entry (by xyz location).
Convert Block Model: Create a Datamine
model file from an existing block model file
from another software package.
Copy: Copy one Datamine file to another
while applying a filter. Only records that
meet filter criteria will be copied to the
output file.
This command is not limited to block models.
It works with any 'xyz' based data file.
Delete Files: Delete specified files.
This command is not limited to Datamine files.
It works with any file extension.
Dig Optimizer: Generate optimized 'dig
blocks' that maximize the valuable material
in a selected Datamine block model while
taking into account minimum mining width.
Drillhole Filter: Limit a drillholes file either
spatially or by applying a standard filter.
Export CSV: Export a Datamine table as a
CSV file.
Field Description
This command is not limited to block models.
It works with any 'xyz' based data file.
Export Whittle: Regularize the cells of an
existing Datamine block model to the input
boundary, then export as a Whittle model.
Field Statistics: Run selected calculations on
the fields in a file.
This command is not limited to block models.
It works with any 'xyz' based data file.
Fields Alter: Rename fields in an existing
Datamine file.
This command is not limited to block models.
It works with any 'xyz' based data file.
Fields Copy: Copy selected records and
fields from one Datamine file to another.
This command is not limited to block models.
It works with any 'xyz' based data file.
Fields Delete: Delete selected fields from a
Datamine file.
This command is not limited to block models.
It works with any 'xyz' based data file.
Fields Sort: Sort a Datamine file based on a
specified list of fields. Each field specified
can be sorted in ascending or descending
order.
This command is not limited to block models.
It works with any 'xyz' based data file.
Formulae: Alter field values in a Datamine
table using formula-based rules..
This command is not limited to block models.
It works with any 'xyz' based data file.
Field Description
Grade Shells: Create a 3D contour shell for
block model cells that meet specific grade
criteria.
Import CSV: Import a *.csv file to generate a
Datamine table.
Import GEMS Block Model: Create a
Datamine block model file from an existing
GEOVIA GEMSTM block model file.
Interpolate Inverse Power of Distance:
Interpolate selected data (for example,
grades, drillhole data, and so on) into a
Datamine block model from a selected
source file using the 'inverse power of
distance' algorithm.
Interpolate Nearest Neighbor: Interpolate
selected data (for example, grades, drillhole
data, and so on) into a Datamine block
model from a selected source file using the
'nearest neighbor' algorithm.
Join: Join two Datamine block model tables
together on selected fields.
This command is not limited to block models.
It works with any 'xyz' based data file.
Lerchs-Grossman: Generate an optimal
ultimate pit (or shells) contour from a
Datamine block model using the Lerchs-
Grossman algorithm.
Parse By Fields: Parse a Datamine file out to
multiple files based on the unique
combination of field values.
Pseudoflow: Generate an optimal ultimate
pit (or shells) contour from a Datamine
block model using the Pseudoflow
algorithm.
Field Description
Script VB: Alter a Datamine file using a
Visual Basic (VB) script.
Use: Select this checkbox to run the command
when you click Run . Clear the checkbox to skip the
command and move to the command in next row.
Use this feature to save prior entered commands in the
rule. Just clear the Use checkbox for those
commands you do not want to run at any given
time.
To select or clear all Use checkboxes for all of the
commands in the grid at the same time, right-
click to display a shortcut menu. Then click
Select All 'Use' Check Boxes or Clear All
'Use' Check Boxes as required.
Show Table: Select this checkbox to display the
resultant Datamine table for a command in
Deswik.TableViewer after the command has run. If
you clear the checkbox, the table will not appear.
Click Cancel in Deswik.TableViewer after the table for
an output file is shown to cancel the rule at that
point. In other words, the rule will not proceed to
the next command.
Description: Optional; enter a brief description for
each command in the rule.
Field Description
Run multiple selected By default, only the active rule (that is, the rule that is
rules currently selected in the grid) is run when you click Run .
Select this checkbox to run more than one rule. An
additional column called Run will appear in the Rule grid.
Select the checkboxes for all of the rules you want to run.
The command will process these rules in the order they
appear in the grid. For example, in the image on the left,
only the last rule (which is gray to indicate it is selected) will
run. The Run column is not even visible. In the image on the
right, all three rules will run, because the Run column is
visible, and all three checkboxes are selected.
Run multiple selected rules
Run multiple selected rules
To select or clear all Run checkboxes for all of the
commands in the grid at the same time, right-click to
display a shortcut menu. Then click Select All 'Run'
Check Boxes or Clear All 'Run' Check Boxes as
required.
Field Description
As long as the Run multiple selected rules checkbox is
cleared, only the active rule will be run. This is true even if
the Run checkbox has been selected for a few rules but the
Run column is hidden. If the Run multiple selected rules
checkbox is selected but no rules have been selected to
run, the following message will appear when you click
Run : The 'Run' checkbox is not selected for any rules.
Would you like to run rule [Name of rule] in the
selected row? Click Yes to run the rule in the selected
row only. Click No to select other rules to run.
Sequential Datamine table commands can be run from a
process map. When you do, the Run multiple selected
rules checkbox will not be visible. This is by design. To run
more than one rule, just add multiple instances of DM
Commands in a row on the Command tab.
Apply rule to multiple Run the selected rules over multiple models using a
models selected 'find and replace' rule.
If the Run multiple selected rules checkbox is also selected,
the command will process the rules in the order they
appear in the grid, applying each selected rule to the
models specified here.
Click to display the Search And Replace Rules
dialog to create new or edit existing rules.
Keep input files and output files in the same directory
and give careful consideration to the names you
assign to simplify the 'search and replace'
function.
Field Description
Number of Iterations: Although each row in a 'find
and replace' rule represents an iteration, you can
also perform a number of iterations per row by
entering the number of iterations that you want to
perform, and then using '[*Iteration]' in your rule
formula to reference this number. An example
follows.
Search Rules: Click to the right of the field to
display the Search And Replace Text dialog.
Text To Search For: Enter the text that you
want to look for.
Field Description
Text To Replace With: Enter the text that
you want to replace the text in the Text To
Search For field with.
See example
Click to import an existing rules file with a
*.deswikdataminecommands extension.
Click to export all existing rules as a
*.deswikdataminecommands file.
Override directory Optional; browse for a working directory to append as a
prefix to file names. Command fields that require you to
select files will no longer require the full directory path,
making the process of moving data between directories
easier. In the following image, Deswik.CAD internally reads
the file name and location for the Defined File field as
'C:\Database\Testing\Interp_vsbmgrd.dm'.
This field supports the use of global constants. This is also true
when the command is accessed through a process map.
Run Click to run the list of commands in the selected rule
without exiting the dialog.
Save Click to save all existing rules without exiting the dialog.
Close Click to close the dialog without running the rules.
Be sure to Save any changes you have made before exiting.
Related topics:
Sample Rule And Results