Scripts make MineSight better

Share Embed Donate


Short Description

Descripción: MineSight is a powerful 3D data modeling and visualization package that offers great flexibility for geolog...

Description

Scripts make MineSight better MineSight is a powerful 3D data modeling and visualization package that offers great flexibility for geologic modeling, mine planning, design, and evaluation. Scripts complement the functionality of the software and can improve the workflow of a project, saving time and resources. Mintec offers many scripts along with MineSight and this article will discuss some of the standard scripts that come with a MineSight installation, 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 different MineSight programs. The table below indicates how scripts must be run – this is usually indicated by the script prefix (e.g., em- or ip-). Prefix No Prefix CP EM IP

Batch IP

SA

Description Script is executed either as a standalone from Windows Explorer or a Command Prompt, or from MineSight 3D (MS3D) (e.g., shellRpt. pyz) Script is executed as a MSCompass Procedure (e.g., cpModelCalcTool.pyz) Script is executed within MS3D: File | Scripts (e.g., em-polystats. pyz) Script is executed from the MSIP Cut Design dialog (e.g., ip-accum. py) 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-ipsummary.py) 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)

Location in MineSight directory MineSight\scripts MineSight\metlib MineSight\scripts MineSight\scripts\reserve

MineSight\scripts\reserve

MineSight\scripts

Note: More detailed information about all of the scripts discussed in this newsletter can be found in the MineSight Help under the “MineSight Scripts” topic. Reporting Scripts can be used to generate files or reports from multiple elements in an object or objects in a directory all at once. createPartials.pyz This script will generate partials files for each solid element within a specified input directory and output the partials files to a specified location. Names of the partials files can be controlled using several provided wildcards. Other options 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 completion, and an audit report file can also be saved to a specified location and set to spawn in a new window once the script is closed.

O c t o b e r

2 0 1 1

1

m i n e s i g h t

®

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 selection mode in an MS3D project. Items reported for each element include length, area (polygons), start point xyz, end point xyz, number of points, median elevations, 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 statistics report generated using the script em-polystats.pyz

poly2dRpt.pyz This script generates a comma separated (CSV) report containing user selected characteristics for all 2D polygons and/or 2D polylines contained in either a single specified geometry object or all geometry objects in a specified directory. The items reported are completely customizable, and elements can be filtered based on plane levels and orientations. The report will be saved to a specified location and can be configured to spawn automatically upon completion. 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

O c t o b e r

2 0 1 1

2

m i n e s i g h t

®

shellRpt.pyz This script generates a comma separated (CSV) report listing desired characteristics for either all solids and surfaces in a single geometry object, or within a specified directory. The report is completely customizable, and will include only the attributes chosen by you. Filters can be configured based on an array of items. The report will be saved to a specified location and can be set to spawn automatically upon completion. 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 Utilities can speed up tasks associated with short term mine planning, improving the overall work flow of a project. The three scripts below are all embedded and must be run from within MS3D. em-AutoCutGeneration.pyz This script creates rectangular cuts within a region defined by a geometry object containing pit contour polygons. The cuts are generated with a specified X and Y width, oriented along a specified azimuth. Naming options can be used to attribute cut elements with a name based on supplied wildcards. These cuts are usually designed to be used with MineSight Schedule Optimizer (MSSO). Following creation, 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-AutoCutGeneration.pyz

O c t o b e r

2 0 1 1

3

m i n e s i g h t

®

em-ImportCutstoMSPD.pyz This script will import multiple planar 2D polygons or solids from a geometry object into a MineSight Interactive Planner (MSIP) plan. For this script you need an existing MSIP plan to import the cuts to. This script is especially useful for importing large numbers of cuts into an IP plan; speed is drastically increased for large data sets. A grid in the lower portion of the “Import” panel allows you to set MSIP attribute values based on the element or object properties of each cut. The “Default” option will set the value defined in the Attrib Import tab of the MSIP Cut Design window. Level Filtering can be used to assign attribute values differently 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 defined dumping logic and a supplied ramp string. Run the script by itself to test how a particular dump design may be sequenced when filled, or with a connection to a database such that the results will be written back to the chosen MSPD and Haulage Plan. Detailed information about all available dumping logic and configurations 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 Utilities are often needed to get data from one program into a format that can be used by another program, procedure, or user. attrtoascii.pyz This script converts geometry drillholes created using the Drillhole Design Tool to Collar, Survey, and Assay files that can be brought into MineSight Basis files using concsa.dat and p20101.dat. When using the Drillhole Design Tool to create drillholes, it is important to have the option to Attribute dh geometry with dh name toggled on. If drillholes do not have an attributed element name, the script will not export them. In the script dialog, you can select the geometry object containing your drillholes, name the dh files created, specify an output directory, and choose if you would like your files 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

4

Figure 6: Attrtoascii.pyz can convert drillholes designed using the Drillhole Design Tool to Collar, Survey, Assay format ASCII files.

sa-Surpac_To_MSR This script can be run standalone or embedded. It converts a Surpac DTM file (Digital Terrain Model) and its accompanying STR file into a MineSight MSR file contoursFromDir.pyz Run within MS3D, this script loops through a specified directory, inspecting all MSR files 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 prefix con- in front of the source object’s name. Project Information Utilities em-info.pyz Run from MS3D this script will display all information on MS3D, MSGRAIL, MPYTHON, and Python; primarily used for troubleshooting. 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 representing 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 Settings (File | Project Settings), which may not match the Project Control File (PCF) extents. minesight-info.pyz Run from MS3D or a command line this script gets information about the computer and MineSight dependencies. Information on dependencies is separated by tabs. The addition of scripts allows us to easily develop supporting tools quickly that meet very specific user needs. This article discussed some of the more common scripts that come standard with MineSight, but more scripts are included in the installation and new scripts are constantly being developed. Through the use of scripts, the capabilities of MineSight can be greatly enhanced.

w w w. m i n e s i g h t . c o m O c t o b e r

2 0 1 1

5

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF