Engines Home | MSCODE
HxGN MinePlan™ 3D Standalone Engines Help v.4.4.4 |
|
MSCODE.EXE is the standalone version of the MS3D drillhole coding and model coding that is run from the command line. Using MSCODE you can either directly code the model or drillholes, or output a partials file. To display the available options for MSCODE.EXE use either -h or -v. The syntax for using MSCODE from the command line is described below.
MSCODE requires the use of a "template" file or an "INI" file for input. Either file can be created using the Export option on the Model View Properties | Code Model dialog or on the Drillhole Properties | Code DH dialog in MS3D; this is discussed in further detail below, see Usage Example section. [Also refer to the MS3D help documentation, MS3D.CHM] Codes can be either integer or real (float) values.
An .mscode file can contains thousands of lines, such as in the example displayed below which has over 8,700 lines.
Use -o <file> to write the partials to the specified file rather than code the model. This option is only available when using template files that code models. Multiple sessions will overwrite, rather than append, values to the specified file. The output file is written in MSBasis program, M659V1 format [NOTE: the documentation for program M659V1 is located in %medexe%\helpdoc\M600.PDF]. Use the -r option to output percent values in the partials file as real (floating point) values. This option invokes the Free format (-f) switch. The -f option is used to output the partials file in Free format. The -a option is used in conjunction with the -o <file> option to create an output file in "Area Specification" file format. The output consists of the starting level, ending level, starting row, ending row, starting column, and ending column [IL1 IL2 IR1 IR2 IC1 IC2]. An "Area Specification" file is also called a "Block Definition" file. It is used in creating a compressed model file (file 15) because it defines the model area [reference in the MS3D helpdoc, go to the section, "Initialize New Project Files" found via MS Compass | PCF Editing | Project File Editor. Use the -nn option switch to Ignore Geometry Element name grouping in the Geometry Set. In the INI file "mscode_options" section, key value "ignore_elem_names=true" has the same effect as using -nn. If "Override Code" is toggled on for the first element group in the Geometry Set, MSCODE will use the override code as the code value for all the elements contained in the object. Otherwise, MSCODE will use the code value for each element in the object. Use the -np switch to suppress the progress display. By default, while MSCODE is running, progress meter percentiles are output to the screen. The -np option is used to avoid the list of progress percentiles. The -q option suppresses all output except for error messages.
Usage Examples
In these examples there are either 6 surfaces; 5 nested pits and original topography (in the drillhole coding example below, solids are used). The image below illustrates these surfaces as they are displayed in a 2D orthogonal cross section view in MS3D. The model item, "Zone" is displayed in gray = 0. Prior to using MSCODE, either a .mscode file or an .ini file must be created as one or the other is required for input. Begin in MS3D by selecting the geometry in the Geometry Set Editor which is accessed from either the Model View Editor | Geometry tab, or the Drillhole View Properties | Code DH tab. TIP: When you are using multiple solids, surfaces or polygons for coding, be sure to check the model code priority via the "Coding Priorities" dialog.
Once you are satisfied with the selected geometry and their code values, save the geometry set. In this example, the set is named, "Pit Phases". Then, in the Model View Editor | Code Model tab (or in the Drillhole View Properties | Code DH tab) click on the "Export" button to export the geometry set to either Template (.mscode) or INI (.ini) file format. Once an .mscode or .ini file has been created, it can be used by MSCODE. To start, the model code item "Zone" is unset. This item will be coded based on the code settings as shown in the Geometry Set Editor (see image above). Previously selected coding option were also saved to the .mscode file or .ini file along with the geometry set information. Use the syntax below (using an ".mscode" file will return the same results). mscode.exe -i pit_phases.ini As viewed in MS3D, below is the result from using the syntax above. Drillhole intervals can only be coded based on solids or polygons. If you use polygons to code drillhole intervals, only those intervals within the area of influence of the plane where the polygon(s) exist will be coded. To start, the drillhole item "Zone" is unset.
Item "Zone" will be coded based on solids geometry that is saved to "pit_phases_solids.ini". Selected coding options are also saved to the ".ini" file along with the geometry set information (using an ".mscode" file will return the same results). Use the syntax below to code the drillhole intervals. mscode.exe -i pit_phases_solids.ini As viewed in MS3D, below is the result after using the syntax above.
You can use MSCODE to create a partials file. There are 3 options available; integer, real, and area specification. Again, the coding options and geometry set must be selected within MS3D and saved to either an ".ini" file or ".mscode" file for use with MSCODE on the command line. Use the following syntax to output a partials file in Free format. Use of the "-f " switch is optional (it is the default). mscode.exe -i pit_phases -o output.prt *OR* mscode -i pit_phases -o FreeFormat.prt -f The Partials Files that are output using either syntax are identical: The Partials File has Header Lines, Partials Lines, and Footer Lines The Header Line defines the range of blocks that the following partials lines cover. The Header Line has the format: Bench# , Phase # (always 0), starting Column#, ending Column#, starting Row#, ending Row#, Bench#. The Footer Line begins with "-1" and contain 0's for the other columns. The Header and Footer Lines break up the partials records by bench. The Partials Lines are bracketed between a Header Line and a Footer Line, and are listed in the format: Bench#, Row#, Column#, partials%, Column#, partials%, Bench#. [see also the discussion about Partials files in the VOXEL documentation.] Use the following syntax to output partials in real format: mscode.exe -i pit_phases.ini -o RealPartials.prt -r In this case, the output partials value is a real value, not an integer. The image below shows the output using the syntax above. The header line is highlighted in yellow, the footer line in pink, and the partials lines are sandwiched between using the format, Bench#, Row#, Column#, partials%, Column#, partials%, Bench#. The partials% values are in columns highlighted in blue. Use the following syntax to output an "area specification" type of partials file using the same ".ini" file shown above. An area specification file is used to define the model blocks that occur within a specified geometry (surface, solid, polygon). mscode.exe -i pit_phases.ini -o AreaSpecification.prt -a The output Area Specification file is shown below. The format for an Area Specification file is: IZ1 IZ2 IR1 IR2 IC1 IC2 (as shown above). IZ1 = Starting level number IZ2 = Ending level number IR1 = First row in each level IZ1 to IZ2 IR2 = Last row in each level IC1 = First column in each row IR1 to IR2 IC2 = Last column in each row The above Area Specification Line can be repeated as often as necessary to define all areas of interest in the model. Area specifications can overlap; however, once a level is completed, any defined row cannot be redefined. For example: 1 6 1 50 25 75 5 7 1 45 30 80 Overlap on levels 5 and 6. The result would be the largest definition for rows 1 to 45 where columns 25 to 80 would be defined. [Also refer to the documentation for MSBasis program, M601V2 found in %medexe%\helpdoc\m600.pdf. MSBasis program documentation is also accessed from the Help Menu in MS3D]. |