Running A Seam Model Macro in GEOVIA Minex

A Minex Seam Model SQL macro runs from beginning to end for every mesh point in a grid. In debugging such a macro, it is necessary to insert “PRINT” statements in the code to report the values of input/output variables and other intermediate calculations.

However, if the grids in the seam model are large, it is a daunting task to wade through tens (or even hundreds) of thousands of lines of numbers to try to identify incorrect calculations.

What if you were able to isolate the calculations to a single mesh point in an area of particular interest?

Mining engineers who carry out Open Pit Optimization will already be familiar with this concept where it is implemented as the REPORT_POINT option. Well, it turns out that this is possible. Read on and follow the steps below to find out how to carry out this procedure.

Grid Setup

  1. Open the Seam Model Operations window: Seam Model  Seam Model Operations
  2. Fill out the Setup area as usual, selecting a Reference Grid to populate the Grid Origin, Extent, Mesh Size, and Rotation fields
  3. Browse for and select the Input DD Name
  4. Browse for and select the Output DD Name
  5. Optionally check the Create Output File field and (browse for and) select a File Name

The Seam Model Operations window will look like the image below.

Seam Model Operations Window – Grid Setup

 

Seam Selection

Click the Select Seams button and select a single seam (or multiple seams, depending on the logic of the SQL macro) as shown in the image in Figure 2 below.

Seam Model Operations Window – Seam Select

SQL Macro Selection

Browse for and select the SQL macro. Click the Compile and fill Table button and fill out the table appropriately. The Seam Model Operations window will look like the image in Figure 3 below

Seam Model Operations Window – SQL Macro Table

Area Selection

  • In the 3D Design Window display one of the grid involved in the calculation as Lines
  • Zoom in to the area of interest for which the results of the calculation are required
  • Check the Area Select option
  • Click Digitize and select Snap to MidPoint
  • Digitize a polygon around any mesh point, snapping to the mid-point between it and the adjacent mesh point
  • The 3D Design Window will look like the image in Figure 4 below.
Digitized Polygon around a Single Mesh Point

 

Check the Mask inside option. The Seam Model Operations window will look like the image in Figure 5 below.

Seam Model Operations Window – Area selection

 

Options

Check the Continue on exception(s) option. The Seam Model Operations window will look like the image in Figure 6 below.

Seam Model Operations Window – Options

 

Output

Click OK to run the SQL macro. The results of the calculation will appear in the Output Window and will look like the image in Figure 7 below.

SQL Output Window with Results

 

Note that for the individual seam grids, the number of cells is 1 and that the Maximum, Minimum, and Average values are identical. (All the mesh points for ORIGTOPO are shown since this grid has simply been copied unchanged from the Input DD Name to the Output DD Name and is not modified in any way during the calculations.)

In summary, the ability to obtain intermediate results of a running Minex Seam Model SQL macro is facilitated by the selection of a single grid mesh point.  This is accomplished by the display of a grid as Lines and the creation of a polygon around the mesh point of interest using the digitizing option Snap to MidPoint. The Area selection option Mask Inside must also be checked in order to isolate the single grid node.

For more Minex tips, check out:

Dereck Prince

Dereck Prince

Senior Solution Consultant, GEOVIA at Dassault Systèmes
Dereck has over 30 years of experience in consulting to and training GEOVIA Minex clients worldwide. He is an expert in all of the modules of Minex, and specializes in SQL macro writing and workflow automation using Tcl and VBA. Based in Florida, USA, Dereck is fluent in Spanish and English, and enjoys photography and travel. Dereck also enjoys Reggae, Calypso and Jazz music.