Sunteți pe pagina 1din 5

O c t o b e r 2 0 1 1 1

SCripts make MineSight better


MineSight is a powerful 3D data modeling and visualizaton package that ofers great fexibility for geologic modeling, mine
planning, design, and evaluaton. Scripts complement the functonality of the sofware and can improve the workfow of
a project, saving tme and resources. Mintec ofers many scripts along with MineSight and this artcle will discuss some
of the standard scripts that come with a MineSight installaton, what they do, and how they can be applied at your site.
Depending on which script is being run, you may have to launch it in one of a few ways. Scripts can be run from a
command line, directly through Windows Explorer, or inside diferent MineSight programs. The table below indicates
how scripts must be run this is usually indicated by the script prefx (e.g., em- or ip-).
Note: More detailed informaton about all of the scripts discussed in this newsleter can be found in the MineSight Help
under the MineSight Scripts topic.
Reportng Scripts can be used to generate fles or reports from multple elements in an object or objects in a directory
all at once.
createPartals.pyz
This script will generate partals fles for each solid element within a specifed input directory and output the partals fles
to a specifed locaton. Names of the partals fles can be controlled using several provided wildcards. Other optons can
be used to specify sub block count, integer or real number precision, use closed solids only, or save responses for the next
run. A report will appear in the script window upon completon, and an audit report fle can also be saved to a specifed
locaton and set to spawn in a new window once the script is closed.
Prefx Descripton Locaton in MineSight directory
No Prefx
Script is executed either as a standalone from Windows Explorer or
a Command Prompt, or from MineSight 3D (MS3D) (e.g., shellRpt.
pyz)
MineSight\scripts
CP
Script is executed as a MSCompass Procedure (e.g., cp-
ModelCalcTool.pyz)
MineSight\metlib
EM
Script is executed within MS3D: File | Scripts (e.g., em-polystats.
pyz)
MineSight\scripts
IP
Script is executed from the MSIP Cut Design dialog (e.g., ip-accum.
py)
MineSight\scripts\reserve
Batch IP
Script is executed in batch mode outside MineSight, using data
collected from a MineSight Planning Database (MSPD) that has
been populated with reserves data from MSIP. (e.g. batch-ip-
summary.py)
MineSight\scripts\reserve
SA
Script is designed to be a standalone script. These scripts can be
run from a command prompt, or from Windows Explorer using
mpython.cmd. (e.g. SA-Surpac_to_MSR.py)
MineSight\scripts
m i n e s i g h t

O c t o b e r 2 0 1 1 2
This script can be run either within MS3D or as a standalone script from Windows Explorer or a command prompt.
em-polystats.pyz
This script will generate an HTML report summarizing all polylines and polygons that are in selecton mode in an MS3D
project. Items reported for each element include length, area (polygons), start point xyz, end point xyz, number of points,
median elevatons, and std. dev. of median. An example report is below in Figure 1. As this is an embedded (em-) script,
it must be run within MS3D while data is selected.
Figure 1: An example of a polyline statstcs report generated using the script em-polystats.pyz
poly2dRpt.pyz
This script generates a comma separated (CSV) report containing user selected characteristcs for all 2D polygons and/or
2D polylines contained in either a single specifed geometry object or all geometry objects in a specifed directory. The
items reported are completely customizable, and elements can be fltered based on plane levels and orientatons. The
report will be saved to a specifed locaton and can be confgured to spawn automatcally upon completon. See Figure 2
for an example of the report produced. This script can either be run from Windows Explorer or a command prompt as a
standalone script, or from within MS3D.
Figure 2: An example of a CSV report produced by the script poly2dRpt.pyz
m i n e s i g h t

O c t o b e r 2 0 1 1 3
shellRpt.pyz
This script generates a comma separated (CSV) report listng desired characteristcs for either all solids and surfaces in a
single geometry object, or within a specifed directory. The report is completely customizable, and will include only the
atributes chosen by you. Filters can be confgured based on an array of items. The report will be saved to a specifed
locaton and can be set to spawn automatcally upon completon. The script can be run either from within MS3D, or as a
standalone script from Windows Explorer or the command prompt.
Figure 3: An example of a report produced using the script shellRpt.pyz
Short Term Planning Utlites can speed up tasks associated with short term mine planning, improving the overall work
fow of a project. The three scripts below are all embedded and must be run from within MS3D.
em-AutoCutGeneraton.pyz
This script creates rectangular cuts within a region defned by a geometry object containing pit contour polygons. The
cuts are generated with a specifed X and Y width, oriented along a specifed azimuth. Naming optons can be used to
atribute cut elements with a name based on supplied wildcards.
These cuts are usually designed to be used with MineSight Schedule Optmizer (MSSO). Following creaton, cuts are
usually imported into the MineSight Planning Database using the script em-importCutstoMSPD.pyz.
Figure 4: A group of polygonal cuts generated for use with MSSO by the script em-AutoCutGeneraton.pyz
m i n e s i g h t

O c t o b e r 2 0 1 1 4
em-ImportCutstoMSPD.pyz
This script will import multple planar 2D polygons or solids from a geometry object into a MineSight Interactve Planner
(MSIP) plan. For this script you need an existng MSIP plan to import the cuts to. This script is especially useful for
importng large numbers of cuts into an IP plan; speed is drastcally increased for large data sets.
A grid in the lower porton of the Import panel allows you to set MSIP atribute values based on the element or object
propertes of each cut. The Default opton will set the value defned in the Atrib Import tab of the MSIP Cut Design
window. Level Filtering can be used to assign atribute values diferently depending on the level where the cuts exist in
space.
As this is an embedded (em-) script, it must be run from within MS3D.
Em-WasteDumpSequencer.pyz
This script sequences a set of waste dump cells based on a defned dumping logic and a supplied ramp string. Run the
script by itself to test how a partcular dump design may be sequenced when flled, or with a connecton to a database
such that the results will be writen back to the chosen MSPD and Haulage Plan.
Detailed informaton about all available dumping logic and confguratons can be found in the MineSight Help. An example
of a series of waste cells that have been sequenced using the Waste Dump Sequencer is below in Figure 5. This is an
embedded script, thus it must be run from within MS3D.
Figure 5: A group of dump polygons that have been sequenced using the Waste Dump Sequencer.
Conversion Utlites are ofen needed to get data from one program into a format that can be used by another program,
procedure, or user.
atrtoascii.pyz
This script converts geometry drillholes created using the Drillhole Design Tool to Collar, Survey, and Assay fles that can
be brought into MineSight Basis fles using concsa.dat and p20101.dat. When using the Drillhole Design Tool to create
drillholes, it is important to have the opton to Atribute dh geometry with dh name toggled on. If drillholes do not have
an atributed element name, the script will not export them.
In the script dialog, you can select the geometry object containing your drillholes, name the dh fles created, specify an
output directory, and choose if you would like your fles in csv format. This script can be run from either within MS3D, or
as a standalone script from Windows Explorer or a command prompt.
O c t o b e r 2 0 1 1 5
www. mi ne s i ght . c om
Figure 6: Atrtoascii.pyz can convert drillholes designed using the Drillhole Design Tool to Collar, Survey, Assay format ASCII fles.
sa-Surpac_To_MSR
This script can be run standalone or embedded. It converts a Surpac DTM fle (Digital Terrain Model) and its accompanying
STR fle into a MineSight MSR fle
contoursFromDir.pyz
Run within MS3D, this script loops through a specifed directory, inspectng all MSR fles for shell elements (surfaces
and solids). If shell elements are found, they are contoured into corresponding new objects in a target directory. Once
complete, the target directory will contain an object with groups of contours, for each object with shells in the source
directory. The new objects will have the prefx con- in front of the source objects name.
Project Informaton Utlites
em-info.pyz
Run from MS3D this script will display all informaton on MS3D, MSGRAIL, MPYTHON, and Python; primarily used for
troubleshootng.
em-materials.pyz
Run from MS3D, this will report material references for all selected folders. Objects and folders to be reported on are
selected through the MS3D Data Manager. The window of the script will show material references, referenced objects,
and object materials detail.
em-project-bounding-box
This script generates a solid representng the project minimum and maximum coordinates, and stores it in a geometry
object named Project Bounding Box in the _msresources folder. Note that the coordinates used are from the MS3D
Project Setngs (File | Project Setngs), which may not match the Project Control File (PCF) extents.
minesight-info.pyz
Run from MS3D or a command line this script gets informaton about the computer and MineSight dependencies.
Informaton on dependencies is separated by tabs.
The additon of scripts allows us to easily develop supportng tools quickly that meet very specifc user needs. This artcle
discussed some of the more common scripts that come standard with MineSight, but more scripts are included in the
installaton and new scripts are constantly being developed. Through the use of scripts, the capabilites of MineSight can
be greatly enhanced.

S-ar putea să vă placă și