You are on page 1of 6

Practical Scripts for Daily Work

Practical Scripts for Daily Work


Mintec, Inc. formed the Solutions Group to add significant value to the application of
MineSight®. While MineSight is a complete package and provides tools to solve the vast
majority of geologic and mining problems, there are site-specific requests and customized
workflows that are best implemented with a specific script or procedure.
Clients have turned to the Solutions Group in several cases to help solve site-specific
issues. Six interesting examples are outlined in this paper.
Problem #1: The client needed to expand the amount and type of information available about
a symbol in the Geomap Tool for detailed geologic mapping and subsequent reporting.
Solution: A Python™ script was developed to take the active element symbol in the
Geomap Tool, and transfer the geometry to the MineSight Planning Database (MSPD).
The script’s interface allows the user to easily input additional information related to the
mapping and stores this data as attributes in the MSPD. The script is designed to handle
multiple Geomap symbols at once, in the case of a joint set for example.

Geometry Views of this Geomap data can be created in MineSight 3-D (MS3D), and
queried just like any standard object:

Mintec, Inc.
Global
Mining
Software
Solutions
Since
1970

With all of the required information stored in


the MSPD, detailed reports can be generated
without having to merge information from
multiple sources.

Page 1
Practical Scripts for Daily Work

Problem #2: In order to ensure that important modeling-related functions have the proper
parameters and can only be changed by authorized personnel, the client needed to protect
MineSight Compass™ (MSCompass) multi-runs, but still have them executable by all users.
Solution: The Solutions Group developed a Python™ script to display the multi-run
and it’s variables in a graphical user interface with a password entry field. The multi-run
procedures and variables cannot be changed unless the correct password is entered.

Mintec, Inc.
Global
Mining
Software
Solutions
Since
1970

Multi-run Manager –
Panel #1

Page 2
Practical Scripts for Daily Work

Multi-run Manager –
Panel #2

Mintec, Inc.
Global
Mining
Software
Solutions
Since Multi-run Manager –
Panel #3.
1970
Problem #3: The client had several geologists mapping underground geologic features
with individual tablet PCs. They wanted the combined data stored in one master database
in an office desktop computer. They needed a way to transfer the data from the individual
databases to the master database at the end of each shift. Conversely, they required a
method of transferring the contents of the master database back to the individual databases

Page 3
Practical Scripts for Daily Work

at the start of each shift. This would ensure everyone was working with the most recent data
on any given day.

Solution: The MSPD Briefcase. This Python script uses SQL (Structured Query Language)
to facilitate the easy updating of a master office database with new or modified elements
from a portable notebook database. This includes:
o New IP sets.
o New attribute definitions.
o New/modified attribute values.
o New/modified elements (e.g., polylines, polygons, etc.).
The script also allows the user to overwrite the notebook database with the contents of the
master database. The script was written in a generic style such that it will work with both
Microsoft® Access and SQL Server databases (it is possible to transfer data from one type of
database to another).

Mintec, Inc.
Global
Mining
Software
Solutions
Since
1970

Problem #4: Recent changes to the block model and stope size at a client site highlighted
accuracy issues with the grade/tonnage reporting. The block model is a multiple ore percent
model with ore and waste regions inside each block. If a stope solid does not encompass a

Page 4
Practical Scripts for Daily Work

full block there is no way of knowing if the partial mined is ore or waste (or a combination
of the two). Their existing processes using MineSight Interactive Planner (MSIP) and
Pitres could not provide enough accuracy.
Solution: A “sub-blocking” script was developed which facilitated the creation and coding
of a temporary block model based on the extents of the stope solid. The new block model
can have a smaller, user-defined block size which results in more accurate grades and
tonnages reported on a daily basis. The Python script executes MSCompass procedures to
create the temporary block model [and Project Control File (PCF)].

Example of a sub-blocked stope.

Problem #5: As part of a client’s geotechnical analysis they needed to compare the actual
pit surface with the original pit design surface. This required the creation of vertical cross-
sections, at five meter intervals, for both surfaces. Four parameters needed to be calculated
for both the actual pit and the pit design:

Mintec, Inc.
Global
Mining
Software
Solutions
Since Pit Design Parameters
1970
Manually calculating these parameters for each section and preparing a comparison became
excessively time-consuming.
Solution: A pit comparison script was developed to perform an analysis of the actual pit
and the pit design. The script works by determining the inflection points of the pit section
(the points at which the polyline changes from a bench to a wall, or vice versa). Once the pit
section could be divided into segments, the calculations are performed and the results are

Page 5
Practical Scripts for Daily Work

presented in a spreadsheet. The script can handle multiple sections at once which increases
the efficiency of the process.

Pit sections (actual vs. design).

Problem #6: A client required a method of attributing drillholes in standard MineSight


Assay and Survey files with a specific gravity (SG) value based on grade values and
zone codes. The challenge was that the SG formula was not fixed; the client required
that a solution be developed that allowed for flexibility in the future. This task can be
accomplished with user subroutines, however, not everyone at the client site had experience
with FORTRAN or had a complier on their machine.
Solution: A script was developed which allows the client to enter a calculation in Python
syntax. This calculation can be a simple assignment (e.g.. SG=2.35) or it can contain
conditional tests (e.g., if-then-else). The script performs the calculation and sets the item
value for any drillhole with a collar located within the user-defined geometric constraints.
The calculation can be saved and loaded again in the future. Although the original intent
was to set SG values, this script was designed such that it could set any drillhole item.

Mintec, Inc.
Global
Mining
Software
Solutions
Since
1970

Page 6

You might also like