Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

MineSight®

Proprietary Software: Mintec, inc. MENU SYSTEM - Introduction

The Menu System


MineSight Menu System Using The Menu System To Create Run File
Templates
MineSight Compass (MSCompass) is the user interface program
used with MineSight Basis (MSBasis). Available menus help Sometimes your run file will need an option that is not available
you set up run files and execute one or more MSBasis Programs. through the procedure. Rather than create the run file from
The Menu System processes “procedures”. As each procedure scratch, use the procedure to create a template. Run MineSight
is processed, a function is performed. For example, there are Compass in the Norun Mode and then edit the run file to make
procedures that will do “Interpolation” or “Load Composite whatever changes are needed. Then either run MXPERT or run
Data”. the program manually with the edited run file.

When you select a function from an MSCompass menu (e.g., Using MXPERT
compass.mnu, or msep.mnu, etc), you are selecting a procedure
to process. To perform a function, one or more MSBasis The MXPERT batch file is created each time a procedure is
programs will be run, and run files are needed to execute these run through the menu system. It contains the commands to run
programs. As a procedure is processed, panels will be displayed the specified program with the run file which is created. It may
on the screen asking for information needed to build run files. contain additional commands to list, print or plot the program
As the run files are being built, commands are also being added results. When the procedure ends, control is returned to the
to a command file that will be executed when the procedure menu system.
finishes. These commands execute the programs necessary to
carry out the selected function. If you have run MineSight Compass in the Norun mode and then
have edited the run file, you can type MXPERT at the command
The procedures are ASCII files that are constructed using line to run the program with the new run file. This eliminates
various Menu System commands. Over 400 procedures are the need to type both the program name and the run file name.
provided as a standard part of MineSight. You can also write MXPERT will also continue with any list, print or plot commands
your own procedures to perform site-specific functions. For that were included in the original procedure.
more information on procedures, see the Technical Menu part
of the documentation. Using The Menu System — Overview
In addition to selecting a procedure to run, both systems The flow of the menu system is as follows, using MineSight
allow you to display file information, search for programs or Compass:
procedures and run user-written procedures.
Enter mscompass (or click on the MSCompass shortcut
Initializing the Menu System that was created when MineSight was installed)

Create a directory in which you want to work and cd to that Select a procedure from the menu.
directory.
Panels requesting the necessary information are
displayed, then the run file and command file are
MineSight Compass
prepared.
Type: mscompass
The command file is executed.
The MineSight Compass interface will be displayed and the
You are returned to the menu.
initialization process will automatically begin.

Procedures Program Summaries

Procedures are user-interface files that contain instructions on MineSight Compass provides the menus for selecting
how to set up run files and execute MineSight Basis programs. procedures and then processing those procedures.
Detailed information on writing procedures is included in the
Menu Technical Section.

Revised: 14-June-11 Page MENU SYSTEM-i


MineSight®
MENU SYSTEM - Introduction Proprietary Software: Mintec, inc.

Page Menu SYSTEM-ii Revised: 14-June-11


MineSight®
Proprietary Software: Mintec, inc. MENU SYSTEM - PROCEDURES

PROCEDURES

WHAT IS A PROCEDURE? OVERVIEW OF STEPS

A procedure is a set of special MineSight instructions that allows Write the procedure
you to do one or both of the following:

• Conveniently set up run files. 1. Decide which programs are needed for the task.

• Run a sequence of MineSight programs. 2. Set up and test a run file for each program.

Procedures are run by the Procedure Processor, MineSight


3. Decide which options in the run files will need to change
Compass (MSCompass).
with each execution. Insert variables to create base files.
MSCompass will be frequently referred to as the Procedure
Processor or simply Processor in this section of the 4. Combine the base files and appropriate commands into a
documentation. procedure.

The Procedure Processor operates on Mintec-provided 5. Decide how to prompt the user for the variables.
procedures that are designed to make it easy to perform typical
tasks with MineSight programs. More advanced users can write
Execute a specific procedure
their own procedures to suit their special needs. These procedures
can be especially useful when a sequence of tasks needs to be
Procedures are executed either through the menus or from the
repeated with just a few changes, such as generating a series of
command line:
section plots or designing a series of pits.
From the command line:
This section will provide the information necessary to write these
custom procedures. It is organized according to the following mscompass [drive: path_name]procedure_name [-panel |
topics: response_name | -ascii [drive:path_name]response_name]
[[drive:path_name]project_name]
How a Procedure Works
Procedure names From the menus:
Default responses
Types of variables MineSight Compass: Please refer to the program help.

Building a Procedure where italics are place holders,[ ] denotes optional and | is “or”.
Comments
Labels
Procommands
Calculations
Logical testing
Panels

Creating a Base File


Sample base file
Using variables with ITM commands
Using variables with TMP lines

Revised: 13-July-12 Page MENU SYSTEM-1


MineSight®
MENU SYSTEM - PROCEDURES Proprietary Software: Mintec, inc.

HOW A PROCEDURE WORKS Types of Variables

A procedure is a set of commands in an ASCII file that is written PCF Variables <PCFxx>
in a special procedure language. Each line can be at most
80 characters long. The commands instruct the Procedure All the information necessary to use a PCF variable is contained
Processor to perform various functions. Examples of functions in the PCF file, so, for example, using <PCF21> in a procedure
are: will automatically return the XMIN value for the project. [See
the M101V1 documentation for a list of PCF variables.]
• Ask the user for a filename.
MED Variables <MEDxx>
• Write a line to a run file.
MED variables contain the preselected MineSight file names for
• Multiply PCF27 and PCF28. each of the preselected file types. These variables are <MED8>,
<MED9>, <MED11>, <MED12>, <MED13>, <MED14>,
• Write a command to the MXPERT command file. <MED15>, and <MED25>. Procedure processing scans for
these variables to determine which MineSight files will be needed
Procedure Names
to execute the procedure. The files needed by the procedure will
constitute the list that will be displayed during the procedure
Pxxxxx.DAT the ASCII procedure file
runs. These variables, as the PCF, cannot be modified in a
In general, the file naming convention for Mintec-supplied procedure but can be used in any other capacity. That is, they can
procedures is Pxxxxx.DAT, where xxxxx is a five digit code be part of a panel, they can be used in base files, etc. If during
containing the number of the primary program plus a two procedure processing one of these variables is encountered for
digit sequence code. For example, the procedure to load data which you do not yet have a file, the procedure will be terminated.
to MineSight files 11 & 12 using program M201V1 would be For example, if you are running procedure P20304.DAT, which
called P20101.DAT. exports drillhole data, a file types 11 and 12 are needed. If they
do not yet exist, the procedure will not run to completion and
The five character name “xxxxx” together with its extension mxpert will not be executed. [See the section in the MineSight
must be unique for each procedure. Compass program help documentation for further explanation
of preselected files.]
When you run a procedure, the Procedure Processor searches
for the procedure or sub-procedure first in the local directory, TORQ Variables <TORQxxxx>
then in the directory defined by the %metlib% environment
variable. These variables enable access to the MineSight Torque
(MSTorque) database:
Default Responses
TORQPATH defines the path to the directory where MSTorque
Panels are used to make data input easier and to group the (v.2.0+) is installed (e.g., C:\MineSight\MSTorque).
requested information into logical sets. A panel is a full screen
of information with a title, instructions, and descriptions of the TORQPROJ is the MSTorque project name and includes
various data fields that need to be entered. There can be up to the connetion string (e.g., XXX-SQLEXPRESS\
fifty panels in any given procedure. myMSTorqueProject).

When you enter a panel during procedure processing, the cursor TORQAUTH has value either “Windows” or “SQLServer”
is situated on the first data entry field. The Procedure Processor to indicate the type of authentication for connection to the
allows you to move around to other data entry fields using the MSTorque database.
arrow keys or the tab key. If you have run this procedure before,
TORQSRCFILE is a special .xml file that is prepared by
your previously-entered responses, called default responses, will
MSCompass and it contains Data Source information. This
be displayed in the fields.
.xml file is used in the case of SQLServer authentication to pass
MSCompass stores default responses in its resource file (.PRJ). the encrypted username and password to MSBasis programs.
MSCompass can read ASCII default responses files, and
Procedure Variables
dump out default responses to ASCII files. [Please refer to the
MSCompass documentation in the MS3D helpdoc]
A procedure variable must be given a type and a value before
it can be used. It can also be given a description of up to 40
characters. If you want to access procedure variable 1, refer to
it as <1>. You can access up to 2000 procedure variables.

Page MENU SYSTEM-2 Revised: 13-July-12


MineSight®
Proprietary Software: Mintec, inc. MENU SYSTEM - PROCEDURES

Type - character, real or integer - can be declared in one of numbers such as 3.14159 for this symbol.
two ways:
filename label name message
• by a procommand : ADEF, : RDEF, or : IDEF These are ALPHANUMERIC constants. You would
• from inside a panel substitute alphanumeric strings for these symbols
such as SAMP10.DAT and TOPOG.
Value - can be set in three ways:

• by the procommand :bLET COMMENTS


• by a numeric or lexical calculation bbcomment Any line in a procedure whose first two columns
are blank is considered a comment line, except where specifically
• from inside a panel noted for MSCompass. Such lines are used for internal
documentation only and will not affect procedure execution in
Description - can only be done with one of the DEF any way. It’s a good idea to use comment lines to:
procommands.
• Provide the name of the procedure author and the date
If a variable is used in a panel, it must be typed in the panel; the procedure was written.
however, if you wish to give it a description, you must also use
one of the DEF procommands. • List any special instructions for running the procedure.
There are three special preassigned variable numbers that you • Document the logical flow of the procedure.
may want to use. These can be used like PCF variables with no
!bcomment This format indicates a comment line that is output
further definition.
to the screen. The first two columns are not displayed. These
<498> date and time lines are used to provide information when running the procedure
<499> 4-character project label from your and to improve its readability. MSCompass will present a notice
PROJ.MED file window with your comment as the text.
<500> 3-character user code from your
!bCPAUSE This command causes the screen to pause after
PROJ.MED file
comment lines have been printed to it. Otherwise, the comment
As each instruction line is encountered in a procedure, the lines will appear briefly and the procedure will continue with
Processor looks for variable designations, such as <1>. When a its next command.
variable is encountered, the Processor will substitute the value
that has been set for that variable. In MSCompass, if the variable LABELS
has not been given a value, an error will result.
Any line that begins with ::label is a label (e.g., ::PLOT or
::DORUNS). You can branch to such lines from inside your
HOW DO YOU BUILD A PROCEDURE? procedure, usually by using a :bGOTO or :bREPLY command.
All the commands and instructions that can be used to build The ::PANEL#n label (e.g., ::PANEL3) is special and is covered
a procedure are categorized into six main types: comments, in the Panel section.
labels, procommands, calculations, logical testing and panels.
Although the procedure language is unique to MineSight, many PROCOMMANDS
of the commands, especially the calculation and logical testing
commands, have a Fortran-like structure. Procommands are the procedure language instructions that
control the flow of your procedure.
In the description of procedure commands, the following syntax
is used. Commands always start in column one. • Allow you to move around to different sections of the
procedure
<n> This is either a PCF , MED, TORQ, or procedure
variable. Anywhere you see this symbol you can sub- • Let you define or set procedure variables
stitute a procedure variable like <23>, a PCF variable
like <PCF22>, a MED variable like <MED13>, or a • Provide an interface between the procedure and exterior
TORQ variable like <TORQPROJ>. files, including MXPERT

b This is used as a BLANK character. It is shown any-


where a BLANK space is required.
#n This is a NUMERIC constant. You would substitute

Revised: 13-July-12 Page MENU SYSTEM-3


MineSight®
MENU SYSTEM - PROCEDURES Proprietary Software: Mintec, inc.

Procommands that control movement where


ADEF represents an alphanumeric variable
:bGOTO label transfers control to any label in the procedure RDEF represents a real (floating point) variable, and
(e.g., :GOTO PLOT). IDEF represents an integer variable.

:bREPLY label1 label2 ... labeln (max 7 labels) allows you to For example, : RDEF <22> Maximum Easting will define
branch to one of several alternative labels. A series of !bcomment procedure variable 22 as a real variable representing the
lines describing the alternatives precedes the :REPLY command. maximum Easting.
For example,
:bLET <n> = value allows you to set the value of a procedure
! When prompted, choose one of the following: variable, where the value can be another variable or a constant,
! for example:
! 1) Go to PANEL1 to start over.
! :bLET <22> = <PCF22>
! 2) Go to PANEL3 to specify items.
! The :bLET command will only work on procedure variables;
! 3) QUIT the procedure you are not allowed to set PCF or MED variables. Values can also
be computed using the lexical or numeric calculation commands
!bCPAUSE described later on.
:bREPLY PANEL1 PANEL3 QUIT
Procommands that provide an interface
Select one of the choices and control will be transferred to that
choice. PANEL1, PANEL3 and QUIT must be defined as labels :bFILE #
somewhere in your procedure.
This command should come at the start of a procedure. The
:bEXIT signals the end of the procedure and runs MXPERT. processor will check if you have selected a file of type # from the
BAT, if it exists. MineSight files in your PCF. If a certain type of file is required
to process the procedure or run the program(s), one of these
:bQUIT stops the procedure and does not run MXPERT.BAT. commands for each type of file should be at the beginning of
the procedure.
:?question allows you to ask a YES/NO question. If you select
YES, control is transferred to the next line beginning with :bOPEN runfile
:Y. Otherwise you go to the next line beginning with :N. For :bWRITE basefile runfile
example: :bCLOSE runfile

:?Do you want EAST-WEST cross sections? During procedure processing you are allowed to OPEN and
:N WRITE a base file to an auxiliary file on your local directory.
:GOTO PANEL1 You can open as many files as you want, provided only one is
:Y open at any given time. When a file is opened, any existing file
:GOTO PANEL3 of the same name is deleted. The :bWRITE command will write
an entire base file to the auxiliary file, making the appropriate
MSCompass will display a notice window from which you make substitutions for <n> and autonumbering ITM# commands. (See
a Yes/No choice. “Creating a Base File” later in this section.)

You can have multiple :? commands in a procedure. For example,

Procommands that define or set variables : OPEN test.dat


: WRITE test.bas test.dat
Procedure variables have three attributes: a required type, a : CLOSE test.dat
required description, and an optional value. If a procedure . .
variable is used in a panel, its attributes are set in the panel. == test.bas
However, if it is not, its attributes must be set using a : ADEF, The minimum Northing is <PCF25>
: RDEF, or : IDEF command: The maximum Northing is <PCF26>

:bADEF <n> up to 40 col. description of variable will generate a local file called TEST.DAT which lists the
:bRDEF <n> up to 40 col. description of variable project extent in the y-direction. All lines in auxiliary files will
:bIDEF <n> up to 40 col. description of variable be converted to lower case. Close the auxiliary file when the
procedure no longer needs to access it.

Page MENU SYSTEM-4 Revised: 13-July-12


MineSight®
Proprietary Software: Mintec, inc. MENU SYSTEM - PROCEDURES

$bcommand loc=0/blank local directory


$$description loc=1 metlib directory
loc=2 defil directory
You can also write a single line to either the MXPERT.BAT file or
to the auxiliary file. Any command beginning with $b will write :bPNREAD filename
to MXPERT.BAT and any line beginning with $$ will write to :bPNWRITE panel# filename
the auxiliary file. The auxiliary file MUST be open if you want
to write to it and, as long as it is open, all $$ lines will append Sometimes you may want to use the same panel in more than
to it. The MXPERT.BAT file is automatically opened and closed one procedure. In this case, the panel is stored as an external file
by the procedure processor. Thus, and called from each procedure where it will be used. Because
responses are stored with the procedure and not with the panel,
: OPEN test.dat ordinarily you would have to enter your responses for each
$$ Write a line to the auxiliary file different procedure in which this panel was used.
$ Write a line to MXPERT.BAT
: CLOSE test.dat These two commands are a way of storing and retrieving the
responses to the panel so that they can be used over and over.
:bOPEN The :bPNREAD command is inserted just before a panel and
Any number /combination of WRITEs and $$s will append causes the Processor to ask you if you want to insert the responses
to the file in filename into the subsequent panel. Filename must be in the
defil subdirectory. The :bPNWRITE command, inserted just
:bCLOSE after the panel, says to take the responses in the previous panel,
panel#, and store them back to filename. If you choose not to
:bTYPE message have the responses inserted, anything you enter will be stored
in the procedure default file rather than in filename.
The : TYPE command prints a single line message to the screen.
For example: The following example illustrates variable substitution.

: TYPE Building EAST-WEST sections Example:


: ADEF <12>
:bRUN basefile runfile loc : IDEF <13>
: LET <12> =”AAA”
The : RUN command behaves much the same way as the
:bWRITE command. It copies an entire base file to a file, : LET <13> =222 : PNREAD D20ASC.<12> 1
overwriting any existing file with that name, making the ::PANEL1 PFIL11.DAT 1
appropriate <n> substitutions and autonumbering. Unlike the : PNWRITE 1 D20ASC.<13> 1
:bWRITE command, the :bRUN command can create a file on
the local, defil, or metlib subdirectories. It is usually used to This case will cause d20asc.aaa to be read and have panel
create a run file. Its form is: values written to d20asc.222.

:bRUN basefile runfile loc :bCALL subprocedure

where, The:bCALL command will cause the procedure processor


basefile is the base file from which to copy to look for the procedure subprocedure and insert it into the
runfile is the file to be created procedure.
NOTE: The runfile name can include procedure and PCF
variables for substitution, e.g., This is a way of using the same procedure lines within different
procedures without having to copy them into each one. This is
#b<95 > = 100 # also a way of making modifications to many procedures, by
:bRUN cujo.bas run650.<95> making a modification in the CALLed procedure.

will generate run file RUN650.100


CALCULATIONS
loc is the subdirectory in which to create the run file. The Procedure Processor allows you to define procedure
Use the loc command to specify the subdirectory where the file variables via two types of calculations: numeric and lexical. All
will be written. calculation commands begin with #b.

Revised: 13-July-12 Page MENU SYSTEM-5


MineSight®
MENU SYSTEM - PROCEDURES Proprietary Software: Mintec, inc.

Numeric Calculations :bLET <2> =17.


#b<1> = <2> // 33
All numeric calculations have the form shown below, in In this case, the variable <1> is set to the string 17.33.
which the right-hand side of the equality is an expression to
be evaluated. Each expression must contain an operation; all Concatenation with a blank does the same as concatenation but
operations other than the null operation require the optional inserts a space between the two items being concatenated.
value. Only one operation is allowed in each expression, e.g.,
a+b+c must be done in two expressions. :bADEF <1> character string
:bRDEF <2> floating point number
#b<n> = value operation optional_value :bLET <2>=17.
:b<1> = <2> /b33
<n> is the procedure variable to be calculated. Except for the
null operation, it must be either real or integer. In this case, the variable <1> is set to the string “17. 33”.

Possible operations include: Lexical Calculations

+ addition There are three types of lexical functions: trigonometric, Fortran-


– subtraction like, and file-checking. All lexical calculations have the form:
* multiplication
/ division #b<n> $operation value optional_loc
** exponentiation
# null operation where the operation is performed on the value and the result is
// concatenation assigned to procedure variable <n>.
/b concatenation with a blank
<n> = a real or integer procedure variable
Value and optional_value can be either procedure variables operation = listed below
(e.g., <33>), PCF variables (e.g., <PCF22>), or numeric value = type depends on operation
constants (e.g., 3.14159). It’s a good idea to provide some loc = used only for FILCK operation
checking in your procedure to ensure that you don’t divide by
zero or exponentiate zero by zero. OPERATION TYPE OF VALUE

The null operation is used to set a procedure variable exactly COS (cosine) real/integer (degrees)
equal to a value. When operating on variables of the same type, SIN (sine) real/integer (degrees)
it is equivalent to a :bLET procommand. For example, when TAN (tangent) real/integer (degrees)
<33> is defined as a real variable, these commands are identical. ATAN (arctangent) real/integer

#b<33> = <PCF22># INT (largest integer) real/integer


FIX (truncate) real/integer
:bLET<33>=<PCF22> ABS (absolute value) real/integer
SQRT (square root) real/integer
The null operation will also perform type conversion, e.g.,
FILCK (file exist) character
:bADEF <1> character string FPCF (file in PCF) character
:bRDEF <2> floating point number GETDIR (directory string) character
:bLET <1> = “616” GETFILE (filename) character
#b<2> = <1> # INT (convert) real/integer
FIX (convert) real/integer
In this case, variable <2> is set to real number 616. TRIM (convert) character
WRAP (convert) character
Concatenation will let you concatenate the string representation TRIMWRAP (convert) character
of any procedure variable (e.g., <33>), PCF variables (e.g.,
<PCF22>), or numeric constants (e.g., 3.14159). The resulting FILCK checks if the file specified in the value exists in the
string should be stored in an alphanumeric type procedure directory specified by loc. As usual:
variable, e.g.,
loc = 0/blank check the local directory
:bADEF<1>character string loc = 1 check the metlib directory
:bRDEF <2> floating point number loc = 2 check the defil directory

Page MENU SYSTEM-6 Revised: 13-July-12


MineSight®
Proprietary Software: Mintec, inc. MENU SYSTEM - PROCEDURES

therefore, LOGICAL TESTING


#b<33> $FILCK SAMP25.TOP 2
The procedure language offers a logical structure similar to
will check the defil directory for file SAMP25.TOP. If the file the Fortran IF-THEN-ELSE construct. The entire sequence of
exists, the value of 1 is assigned to <33>. If not, <33> is set to 0. procedure lines for logical testing is:

FPCF checks if the file specified in the value is associated #IF (expression)
with the PCF. If it is found in the PCF, the value #THEN (required procedure command lines)
returned will be the number of that file type. ....
....
If, for example, you are checking your survey file, ....
#ELSE (optional procedure command lines)
#b<33> $FPCF SURVS.DAT ....
....
will return a value of 12 to <33> if your PCF does have such a ....
file. Otherwise a value of 0 is returned. ##ENDIF
INT converts the value to a REAL number and performs
If the expression is evaluated as true, the procedure transfers
a Fortran AINT. The stored result depends on the
control to the #THEN command, where all the following
TYPE of <n>.
commands will be processed until an #ELSE or ##ENDIF line
FIX converts the value to a REAL number and performs is encountered or until the procedure escapes from the logical
a Fortran ANINT. The stored result depends on the construct (e.g., by a GOTO).
TYPE of <n>.
If the expression is false, control is transferred to the next #ELSE
The difference between INT and FIX occurs when operating on statement (if there is one) or to the ##ENDIF statement.
non-integer negative numbers. For example, assuming <33> is
type integer, When the THEN (or ELSE) is complete, the Processor will
look for the ##ENDIF line to continue the procedure. You may
#b<33> $INT –3.7 assigns<33> = -3 branch out of the logical test but you do not have to. The logical
#b<33> $FIX –3.7 assigns<33> = -4 construct is a very powerful tool for controlling the flow of the
procedure. Logical testing can occur in base files and the logical
GETDIR splits the directory path from a path string. constructs can be nested.
For example, if you have a path string, \\a\b\c\d\e.txt, then
The expression in the #IF line has the following form:
GETDIR will return the directory path \\a\b\c\d
#IF value_1 operation value_2
GETFILE splits the file from a path string.
For example, if you have the path string, \\a\b\c\d\e.txt, GETFILE where value_1 and value_2 can be procedure variables, PCF
will return the filename, e.txt. variables, or constants.

TRIM is used to trim leading and trailing blanks. Valid operations are:

For example (using b to indicate a blank space), if you have the .EQ. equality between two numbers
string bMYbDATAb, TRIM will remove the leading and trailing .NE. inequality between two numbers
blanks resulting in MYbDATA. .GT. value_1 is greater than value_2
.GE. value_1 is greater than or equal to value_2
WRAP is used to “wrap” strings with blanks and apostrophes .LT. value_1 is less than value_2
into quotes. .LE. value_1 is less than or equal to value_2
For example (using b to indicate a blank space), if you have the .ES. equality between two character strings
string bMYbDATAb, WRAP will result in “bMYbDATAb”. .NS. inequality between two character strings

TRIMWRAP performs both the TRIM & WRAP operations Be very careful to always compare the same TYPE of values.
in the same step. For example, do not compare the equality of a real variable with
a character variable.
For example (using b to indicate a blank space), if you have the
string bMYbDATAb, TRIMWRAP will result in “MYbDATA”. IF - THEN- ELSE - ENDIF statements can be nested.

Revised: 13-July-12 Page MENU SYSTEM-7


MineSight®
MENU SYSTEM - PROCEDURES Proprietary Software: Mintec, inc.

PANELS variable descriptions, the variable must still be typed with a


< > line.
The most convenient way to enter data into a procedure is by
means of a panel. The section plot set up shown below illustrates Panel lines that get printed on the screen
a panel.
All lines that get printed to the screen begin with the characters
<b. These lines immediately follow the panel label line. The first
panel screen line is the title of the panel. Leave two blank panel
screen lines before starting the actual text.

These are followed by the main body of the panel. There can be
up to 19 lines in the main body, each up to 80 characters long,
including in-line variable substitutions (illustrated in the sample
panel). There will be certain fields in the main body into which
you will want to enter data. It’s a good idea (although it’s not
required) to add a description beside these fields. The entries
in these fields can be either alphanumeric, real, or integer. For
example, suppose you want to include a line on your panel to
enter a minimum Easting, which will be a real number and is at
most 10 characters long:
<. . . . . . . . . . Plot File Minimum Easting
or a 10 character alphanumeric string containing your PCF name:
<. . . . . . . . . . PCF File
There can be at most twenty panels in a single procedure. These In-line variable substitution, as described in the Base File section,
panels are labeled PANEL1 through PANEL20 and can either is also available in the panel lines. For an example, see how the
be in the procedure in-line or called in from an external file. PCF values for minimum and maximum Northing are inserted
in the sample panel.
In a procedure, the panel description is preceded by the panel
label line in the format: Panel lines that describe variables
::PANEL# or
All panel variable description lines begin with < > and follow
::PANEL# panel_name
after the main body of the panel. The form is:
The first case is a label for an in-line panel. The Procedure
var# min max check row# col# type length |(opt)
Processors expect everything in the ASCII procedure file that
follows this label to be part of the panel until a panel terminator where:
is reached (a line consisting of < >–1) var# procedure variable number, from 1 to 2000

The second case is a call for an external panel file. The external min the variable minimum (see check)
panel will be searched for down the search path (normally; local, max the variable maximum (see check)
DEFIL, Metlib).
check 0 omit checking
There are four types of lines in the panel:
1 check the entered value against the values en-
• those that begin with <b and which are printed on the tered in min and max
screen,
2 check the entered value against procedure vari-
• those that begin with < > which are used to define the ables <min> and <max>
panel variables or terminate the panel,
3 check the entered value against PCF variables
• DEF procommands which are used to provide <PCFmin> and <PCFmax>
descriptions of panel variables.
These variable checking options, designated by positive
• those that begin with two blanks (bb) and follow a numbers, are performed only if a value is entered in the
MSCompass specific line. corresponding panel field while the current panel is
being processed. No checking is performed unless the
NOTE: Even though DEF procommands are used to provide displayed variable is entered/modified.

Page MENU SYSTEM-8 Revised: 13-July-12


MineSight®
Proprietary Software: Mintec, inc. MENU SYSTEM - PROCEDURES

-1 check the entered value against the specified add a “ |” somewhere after the usual variable parameters.
minimum and maximum
For example:
-2 check the entered value against procedure vari-
ables <min> and <max> < > 66 100. 300 1 15 10 9 13 | Scaling Factor
-3 check the entered value against PCF values or
<PCFmin> and <PCFmax>
< > 66 100. 300 1 15 10 9 13 Scaling Factor |
These variable checking options, designated by
negative numbers, are always performed when the The line following the panel variable definition line will be
panel is exited, regardless of whether a value was of the form:
entered/modified for that panel variable. These
options can be used to force a value to be entered, thus bb TAG n [string]
preventing bad run files caused by hitting F1 all the way
through the procedure. where,
bb are two blank spaces (this line will appear as a comment in
You can also check just one value or another by MSCompass)
entereing “nc” in the value that you do not wish
to check. If, for example, you wish to check only TAG is one of the following keywords which are described
against the minimum value, then enter that value in the below.
minimum field and enter “nc” in the maximum field
TEXTLIST INTLIST LEVEL BOX
to prevent the maximum value from being checked.
NOTAG LABEL PCFFILE FILE
row# the row number on the panel where this variable is MODLABEL GSMNAME GSMLEV TORQCOMPSET
entered. The rows are numbered starting with the TORQATTR
title line, which is row one.
n is either 0, 1 or -1 to indicate if a response is not required (0),
col# the column number of the panel where entry of this required (1), or not required AND a value that is not on the list
variable begins. The columns are numbered starting can be entered (-1).
with the first column after the <b.
type the type of variable [string] is a string used by some of the options
0 alphanumeric
The keywords are:
1 integer
9 real
TEXTLIST: Select from a specified list of items separated by
length the length of the data entry field. This value along
blanks.
with row# and col# completely determines the loca-
tion and extent of the data entry fields. e.g., bbTEXTLIST 1 3dbm gsm ocs srv
|(opt) additional MineSight Compass option. This is a flag
to MineSight Compass that the next line contains INTLIST: Select from a specified list of integers separated by
information. (See MineSight Compass Tags below blanks.
for options.)
e.g., bb INTLIST 1 44 37 -12 616
So, for example, the line
LEVEL: Select from the PCF list of model benches/levels.
< > 66 100. 300 1 15 10 9 13
e.g., bb LEVEL 1
says to enter up to 13 characters for procedure variable 66 starting
in row 15, column 10. Also variable 66 is a real variable (9) BOX: Insert a check box at the variable panel location. If the
restricted to values between 100 and 300. box is not checked the variable minimum is assigned to the
panel variable. If the box is checked, the maximum is assigned.
To end a panel, enter the line: < > –1 In general, the min and max will be 0 and 1. The check box can
only be used with integer variables.
MineSight Compass Tags
e.g., bb BOX 1
MSCompass has options allowing item selection from lists,
checkboxes, etc. The options are defined on the line following NOTAG: A dummy item used only to process the 0/1 flag to
the panel variable definition line. To invoke one of these options, indicate if the panel item is required.

Revised: 13-July-12 Page MENU SYSTEM-9


MineSight®
MENU SYSTEM - PROCEDURES Proprietary Software: Mintec, inc.

e.g., bb NOTAG 1 In this example, the file name or number is stored in procedure
variable < 111>.
LABEL: Select items from the preselected file for the specified
file number. The example shows how to select from the item list If <111> is a filename (e.g., 111=samp15.dat), then MODLABEL
for the default file 15. allows list selection from the items associated with PCF file
samp15.dat.
e.g., bb LABEL 1 15
If <111> is a file number (e.g., =15), then the MODLABEL
PCFFILE: Select a file name from a list of all the files in the command acts like the LABEL command.
PCF for a specified file type (number). The following example
selects from a list of all the file 25’s in the PCF As long at variable <111> is not “TORQ”, the second variable
(<112>) will be ignored.
e.g., bb PCFFILE 1 25
e.g., MSTORQUE CASE:
FILE: Select from a list of items specified in an external ASCII
file. The items in the ASCII file can be on separate lines or one MODLABEL 1 111 112
line and separated by blanks. The example shows how to select variable <111> = TORQ
from items in a file named itemname.fil. The filename IS case- variable <112> = “My Coverage Name”
sensitive on UNIX platforms.
To get “writeable” attributes ONLY in the dropdown lists, then
e.g., bb FILE 1 itemname.fil add a “w”. This option is ignored when variable <M> is not
equal to “TORQ”.
MODLABEL: Select from a list of items in a MineSight file (9,
11, 12, 13, 15) or from an MSTorque database. When accessing MODLABEL 1 111 112 w
data in an MSTorque database, MODLABEL allows a list
selection of Attribute Names for that coverage/composite set. If “w” is not present, the whole list will be displayed.
MODLABEL 1 M N w GSMNAME: Select from the PCF list of seam names.
The MineSight file name or number is specified by a procedure e.g., bbGSMNAME 1
variable <M>. Use variable <M> = “TORQ”, to access data in
an MSTorque database. GSMLEV: Select from the PCF list of seam level numbers.
Variable must be defined as type real.
If variable <M> is keyword, “TORQ” then <N> is expected to
be a string that contains the name of an MSTorque Coverage e.g., bbGSMLEV 1
or the name of an MSTorque Composite set. Variable <N> is
optional, and it is ignored when <M> is not equal to “TORQ”. TORQATTR: Select from a list of attributes for a given
MSTorque composite set. The attribute is specified by a
An MSTorque attribute can be “writeable” or not. For instance, procedure variable. This tag is analogous to PCFFILE. In the
you cannot store data back to calculated attributes. You also following example, the attribute is stored in the composite set
cannot store values back to “reserved data”, such as “From”, that is defined by procedure variable <194>.
“To”, and “Length” of MSTorque Coverage intervals. In additon
to those three, for composites there are more reserved names: e.g., bbTORQATTR 1 194

“East”, “North”, “Elev.”, “XTop”, “YTop”, “ZTop”, “XBot”, TORQCOMPSET: Select from a list of available composite
“YBot”, “ZBot”, “TotLen”, and “TotWt”. sets in the MSTorque database. This tag is analogous to
MODLABEL. The following example selects from a list of all
By default, the MODLABEL pulldown will include all items. the composite sets in the MSTorque database:
To restrict MODLABEL to writeable attributes only, add flag
“w” at the end. e.g., bbTORQCOMPSET 1

e.g., MINESIGHT FILES CASE: TORQCOVERAGE: Selects from a list of available sample
coverages in the MSTorque database.
MODLABEL 1 111
or e.g., bbTORQCOVERAGE 0 0 keyword1 [keyword2] ...
MODLABEL 1 111 112
where keywords can be:
variable <111> = “filename.dat” or number, and
assay, geology, other, all
variable <112> =

Page MENU SYSTEM-10 Revised: 13-July-12


MineSight®
MENU SYSTEM - PROCEDURES Proprietary Software: Mintec, inc.

At least one keyword is required. If keyword “all’ is specified, POP-UP WINDOWS


the list will include all of the available sample coverages. There
is usually just one keyword type in a pulldown. Very often on procedure panels, there is a need for explanatory
text. This appears on the panel itself, and is very useful the first
TORQPROGRAM: Selects from a list of available sample few times you see the panels. However, it can be distracting
programs in the MSTorque database. thereafter. In order to move this text into a pop-up window, use
the following method:
e.g., bbTORQPROGRAM 0 keyword1 [keyword2] ...
< >-2 row column “text to display on the panel” FILE filename
where keywords can be:
assay, geology, other, all where
-2 indicates that this is to be a pop-up window
At least one keyword is required.
row the row number where the text will be placed
The pulldown list will be created of Sample Programs name that column the column number where text insertion will
apply to types specified in keywords. If you specify “all” then begin
the list will include all of the available sample programs. There
is usually just one keyword type in a pulldown. “text...” the text to display in red in the panel
FILE indicates that the text is to come from a file
filename the file containing the text. The search path
for the file is: local, defil, metlib (just like the
search path for procedures).
< >-2 row column “text” TEXTLIST #of lines of text

where
-2 indicates that this is to be a pop-up window
row the row number where the text will be placed
column the column number where text insertion will
begin
“text” is the text to display in red in the panel
TEXTLIST the text will be on the following lines
# of line the number of lines of text to follow
The text will be on the line(s) immediately after.
You must skip columns 1 and 2.

Page MENU SYSTEM-11 Revised: 13-July-12


MineSight®
Proprietary Software: Mintec, inc. MENU SYSTEM - PROCEDURES

SAMPLE PANEL

::PANEL1
< SAMPLE PANEL These are the procedure commands
< to produce a simple panel.
<
< This is an example of how easy it is to set up a panel!
<
< In-line variable substitution is
<
illustrated by the line that contains:
< ...... Scaling factor
<
< .......... Input ASCII data filename (<PCF25>–<PCF26>)
<
< .......... Northing to plot (<PCF25>-<PCF26>) This line will return the actual PCF
< values when processed (see actual
< panel below).
<> 1 0 0 0 8 12 9 6
<> 2 0 0 0 10 12 0 10
<> 3 0 0 0 12 12 9 10
<> -1

This is how the panel


produced by the above
procedure commands will
appear on your monitor.

Revised: 13-July-12 Page MENU SYSTEM-12


MineSight®
MENU SYSTEM - PROCEDURES Proprietary Software: Mintec, inc.

CREATING A BASE FILE checks a specified variable in the line to determine whether or not
you need to use the line. This process is called autonumbering.
A base file is a section of the procedure containing a template The general form of ITMs in a base run file is as follows:
from which an external file is created during procedure
processing. Typically, the external file is a run file. ITM#n = ...
where
The base file contains options, parameters and other data that may ITM# is the command to autonumber
be designated as variables. When it is processed, each variable n = 0 omits checking any of the variables in the line
is replaced by an actual numerical value or character string, and n = 1 checks to see if the 1st variable field was entered
a regular run file is written. n = 2 checks to see if the 2nd variable field was entered, etc.

Base files can contain the : CALL command to use an external A base file ITM line will be omitted if the variable being checked
file, and they can have IF blocks. is a blank, the # sign, or the word OMIT. If a line is output, the
appropriate number will be calculated with “01” as the first
All base files must be placed together at the end of the number. This allows ITM commands to exceed “10” as needed.
procedure. Each base file must begin with a name in the
form ==basefile where the name contains a maximum of ten Automatic numbering and variable checking work together.
alphanumeric characters (e.g., ==RUN203.BAS). Each base file You can do numbering only, but you can’t do variable checking
label must be unique within a given procedure. without numbering, since the pound sign “#” is the trigger. If
you are using auto numbering, do not intersperse ITM lines with
Variable substitution is one of the most important features in fixed numbers, since auto numbering always begins at 01 and
using base files. Any number of columns can be substituted for increments by 1.
a variable string, although the maximum length of the output
line will be 80 characters. The following base file ITM lines illustrate this usage:

IF - THEN - ELSE statements can be used in base files. Any ITM#1 =<1> <2> CALC <15> / 1st value
line in a base runfile that starts with a # will be processed as a ITM#1 =<3> <4> CALC <15> / 2nd value
logical statement. ITM#1 =<5> <6> CALC <15> / 3rd value
ITM#2 =<10> <11> MATCH MODEL
A base file for program M203V1 is:
Suppose the following values were previously entered (possibly
==RUN203.BAS in a panel):
MEDS-203V1 10=<2>10.DAT 11=<2>11.DAT;
MEDS-203V1 12=<2>12.DAT 3=RPT203.LA <1>=TOTCU <2>=TCU–1
** LIST OF DRILLHOLE SAMPLE DATA ** <3>=MOLY <4>=MO–1
<10>=ROCK <11>=LITHO
USR = <1> <15>=INVWT

COM LIST FILE11 DATA FOR CHECKING The ITM#’s above become the following run file lines:
IOP1 = 1 00 / FILE 12 LIMITS
IOP3 = -1 / LIST ALL DRILLHOLES ITM01 = TOTCU TCU-1 CALC INVWT/1st value
ITM02 = MOLY MO-1 CALC INVWT/ 2nd value
ITM03 = ROCK LITHO MATCH MODEL
GET11= FROM -TO- -AI- <3> <4>
END Since <1> and <3> are not blank, #, or OMIT, two ITM lines
are generated with these variables and are labeled ITM01 and
In the above example, the procedure that calls this base file has ITM02.
previously set variable <1> to be the user’s initials, variable
<2> to be a four character prefix for building the name of the <5> is blank so no ITM line is generated.
MineSight data files, and variables <3> and <4> to be the items
program M203V1 will list. <11> is not blank and generates the ITM03 line. Note that ITM#2
checked the second variable, <11>.
Using Variables with ITM Commands
Using Variables with TMP Lines
Several programs, such as M501V1 and the 620-series, need
to generate run files containing a variable number of ITM Variable checking can also be used with TMP#n lines.
lines, according to the actual options selected by the user. The
TMP#n = ...
MSCompass can number ITMs automatically and optionally

Page MENU SYSTEM-13 Revised: 13-July-12


MineSight®
Proprietary Software: Mintec, inc. MENU SYSTEM - PROCEDURES

where,
n = 0 omits checking any of the variables in the line
n = 1 checks to see if the 1st variable field was entered
n = 2 checks to see if the 2nd variable field was entered, etc.

The TMP#n is removed completely as the lines are output. These


lines have two purposes:

1) For information which falls after the END line, e.g.,

TMP#1 <21> <22>

In program M207V1, if these variables are entered, an


additional survey data request line will be written after the
END line.

2) For run file commands which are optional, e.g.,

TMP#1PAR1 = <41> <42> / Opt Easting Lmts

In program M401V1, if variables 41 and 42 are entered as


5000 and 7000, this line will be written to the run file as:

PAR1 = 5000 7000

It will be omitted if no value is entered for <41>.

Using Variables as Run File Names

The run file name may be made a variable itself. This could be
useful when you wish to generate a series of run files that would
not get overwritten the next time the procedure is run.

1. Define the variable on a panel as described previ-


ously in the Procedure PANELS section. Be sure to
define it as an alphanumeric string.
2. Insert the variable (i.e., <25>) on the : RUN line, the
$ECHO line and anywhere the run file name appears,
e.g.,

:bRUN RUN201.BAS <25>


and
$ ECHO <25> >TMP.TMP

Variable substitution can also be done for only a portion of the


run file name (i.e., prefix, extension, etc.). Also report filenames
can be substituted. In this manner, you can create a series of run
files and report files that are easy to keep track of.

Revised: 13-July-12 Page MENU SYSTEM-14


MineSight®
MENU SYSTEM - PROCEDURES Proprietary Software: Mintec, inc.

SAMPLE FILES

SAMPLE PROCEDURE FILE #1

Procedure to list assay data for one drillhole

: ADEF <1> DRILLHOLE NAME


: RUN RUN203.BAS RUN203.A

$ DEL RPT302.LA
$ ECHO RUN203.A >TMP.TMP
$ M203V1 /R10000 <TMP.TMP
$ LIST RPT203.LA

==RUN203.BAS
MEDS-203V1 10=METL10.DAT 11=<MED11> 12=<MED12>
MEDS-203V1 3=RPT203.LA
** LIST DRILLHOLE DATA FROM FILES <MED11> & <MED12>

USR = ABC

IOP1 = 1 0 / RECORD #’S FOR FILE 12 SURVEYS TO BE USED


IOP3 = -1 / -1=ALL DHS; 0=IN PCF LIMITS; 1=IN SPEC BNDRY
IOP4 = 1 / 0=LIST DHS IN IOP1-IOP2; 1=READ LABELS OF DHS
IOP5 = 0 / 0=DO NOT LIST DELETED DHS; 1=LIST
IOP6 = 0 / 1=PRINT COLLAR DATA, 0=OMIT COLLAR DATA

COM ASSAY ITEMS ORDER WITHIN INPUT DATA.


GET11 = FROM -TO- -AI- TOTCU

END

<1>

This procedure:

• Defines the variable <1>.

• Copies the base file to the run file, inserting the value for <1>.

• Writes commands to the MXPERT.BAT file.


To use this procedure yourself, you must:

Type the procedure and save it as an ASCII file.

• Run the procedure with MSCompass.

• Enter the value for the variable when you are prompted.

Page MENU SYSTEM-15 Revised: 13-July-12


MineSight®
Proprietary Software: Mintec, inc. MENU SYSTEM - PROCEDURES

SAMPLE PROCEDURE FILE #2

! —————————————————————————————
! LOAD.PRO
! PROCEDURE TO LOAD DIGITIZED DATA TO A VBM
! —————————————————————————————
!
: ADEF <1> FILE TO LOAD
: IDEF <2> OVERWRITE OR APPEND
: RUN RUN649.BAS RUN649.A
!
$ ECHO RUN649.A >TMP001.TMP
$ M649V1 /R10000 <TMP001.TMP

==RUN649.BAS
MEDS-649V1 10=<499>10.DAT 25=<MED25> 19=<1> 3=RPT649.LA
** LOAD DATA TO A VBM FILE **

USR = ABC

IOP1 = 1 / 0=DATA IN THIS FILE; 1=DATA IN FILE 19 (VARIABLE <1>)


IOP2 = 0 / 0=WRITE TO VBM FILE; 1=DO NOT WRITE (USED FOR DEBUGGING)
IOP3 = <2> / 0=INITIAL VBM ENTRY; 1=APPEND TO VBM
IOP4 = 1 / 0=DELETE EXTRA POINTS; 1=DO NOT DELETE EXTRA POINTS
IOP5 = 0 / 0=COMBINE FEATURES; 1=DO NOT COMBINE FEATURES
IOP6 = 0 / 0=DO NOT PRINT DETAIL; 1=PRINT DETAILED OUTPUT
IOP7 = 0 / 0=DO NOT CLOSE FEATURES; 1=CLOSE ALL FEATURES

PAR2 = 5. / TOLERANCE FOR COMBINING FEATURES (DEFAULT=5.0)


PAR15 = 0. / FACTOR FOR EXTRANEOUS POINT DELETION (DEFAULT=.0015 IF DATA
COM IS IN VBM COORDINATE SYSTEM; OTHERWISE DEFAULT=6./SCALE)

I-O = 0 / 0=NO DETAILS PRINTED


END

Revised: 13-July-12 Page MENU SYSTEM-16

You might also like