Professional Documents
Culture Documents
h
t
in
-p
-r
-h
usage or help
Examples:
cp-modelCalcTool.pyc -p D:\modelCalc\geo.prj -r default
cp-modelCalcTool.pyc -p D:\modelCalc\geo.prj -r myresponses
(continued on page 2)
Mintec Directory...........................................................................page 10
Changes Anticipated in MineSights Use of SQL.............page 10
2008 Training Schedule...............................................................page 11
Trade Shows and Seminars........................................................page 12
Web-based Training........................................................................page 12
(Introducing the New Model Calculation Script, cp-modelCalcTool.pyc continued from page 1)
Command Line Compass Multirun:
----------------------------mscompass -multi package_name response_name [[drive:path_name]project_name] [-module module_name]
Example:
D:\modelCalc\Winexe\Metlib>mscompass -multi myPkg1 myResponses1 D:\modelcalc\geo.prj
Script Structure
The cp_modelCalcTool.pyc script consists of three sections: Selection, Calculations,
and Summary which are discussed below.
Selection
The Selection section is where the model file is selected as well as various limiting
filters. On the Model Selection And Limits panel, choose the 3D block model you want
this script to work with and then make any optional limiting choices. The limiting choices
made on the Model Selection And Limits panel control the availability of the panels
found in the Limit By and Limit To sections. Model blocks can be spatially limited by a
polygonal boundary, coordinates, and existing model items evaluated by an expression.
Model blocks to be used in the calculations can also be limited to levels, rows, and
columns, or can be bound by surfaces, solids, or level polygons.
Although this script will run on variable height benches and rotated models,
certain filtering options are not available if your model is rotated. If the model
is rotated using a true 3D rotation, then limiting by either boundary, surfaces,
and/or level polygons is not available since those options are applied by
elevation. However, those filters are available in horizontal rotation. Using model
coordinates (Easting, Northing, and/or elevation) to limit the selection is disabled
for all rotated models, but you may limit by the model block indices (column,
row, and/or bench). Coding between surfaces is done relative to the horizontal
orientation.
After the specified filtering, your Python script is run against each block in the
selected set. This allows maximum flexibility for further filtering, processing, and
optionally updating the item values in the block model.
Calculations
The Calculation Items panel is where the model items to be used in this script are
selected. Either enter the item name in the Add Item input field or use the Item Chooser
to display a list of model items from which to choose. The items shown on the list are from
the model you selected earlier on the Model Selection And Limits panel. Only those items
listed on the Calculation Items list can be used in this script.
(continued on page 3)
September 2008
Summary
(continued on page 4)
September 2008
Example 1
This example illustrates the use of a simple set
of calculations. A code for model item ZONE is
calculated based on the blocks existing ROCK code
value and CUPLY grade values.
First, the model to use is selected on the Model
Selection And Limits panel. Since we want to
calculate the value of model item ZONE for every
block in the model, no limiting is used.
September 2008
Example 2
This example shows how to code model blocks that occur between two surfaces. In this case, a code will be
assigned to those blocks that occur between a topography surface and a pit surface.
Under the Limit To Surfaces heading, go to the Control By Surfaces panel. Use the file chooser or type
in the absolute path to the.msr geometry object files that contain the MineSight surfaces. Next, specify the
model item to be used on the Calculation Items panel, followed by the item and what its value should be
equal to over on the Calculation Coding panel.
Example 2 Control By Surfaces and Calculation Coding
panels - Coding model item INPIT with a value of 1 based on the
blocks location between the two surfaces specified on the Control
By Surfaces panel. On the Control By Surfaces panel, the full
path to the surfaces must be entered.
September 2008
Example 3
This example uses cp-modelCalcTool.pyc in a MultiRun to set codes for blocks based on multiple solids.
While model blocks can be coded from solids directly in MS3D or by using the standalone engine mscode.
exe, this example shows how to accomplish the task using this script.
On the Model Selection And Limits panel, choose to limit by Solids. The Control By Solids panel will
then become available where the absolute path to the solids objects is entered. In this example, the surfaces are
all located in the same directory and each surface is defined using multi-run variable, ?01. Once setup has been
completed, run the script via File | Run Procedure. Note: in a MultiRun setup, the Test One Block option is
not available.
Example 3 Control By Solids and Calculation Coding
panels Solids are defined as MultiRun variable ?01, and
values to be assigned are defined by MultiRun variable ?02.
September 2008
Example 3 Model view showing item AREA after coding using the
cp-modelCalcTool.pyc script. One model block located in area 8
Example 3 This picture shows the eight different solids (each
is shown in the yellow block query highlight.
colored differently) before coding. The smallest solid (area 8) is
outlined by a query box.
Example 4
This last example is a bit more complex as it shows the use of cp-modelCalcTool.pyc in multiple
instances in the same multirun package and response set.
In the first setup, cp-modelCalcTool.pyc is used to set code values for blocks between multiple surfaces.
The result from this run will then be used for calculations in the second setup.
Upper and lower surfaces are defined as variables ?01 and ?02 on the Control By Surfaces panel. The
surface defined by variable ?01 is always above the surface defined by variable ?02. Since there are four pairs
of surfaces, the script will be run four times to code all the blocks in the model below the uppermost surface
(or below topography).
(continued on page 8)
September 2008
September 2008
Example 4 This shows the Python script used to calculate model item
XTRA1 in the second setup.
September 2008