Smaller text size Reset text size Larger text size
skip navigation
NHDOT Home CAD/D Home MicroStation MX v8i OpenRoads Downloads
CAD/D Home > MX v8i > MX Input files v8i

MX Input files v8i

Most MX commands are echoed in code format.

Experienced MX operators will compile design code into input files.  Therefore when design adjustments are necessary, the input file can be modified and rerun in a fraction of the time necessary to interactively reproduce the design.

Capturing The Code

There is more than one source of MX code available.  Input files may be compiled from any combination of the following sources.

Programmers File Editor (PFE)
The recommended editor for creating or editing input files is the Programmer's File Editor ( PFE ).  This editor should be installed on all workstations where MX is installed.

Recording a Journal File
A Journal file is a recording of the input code captured during interactive processing.  Controlling a recording is similar to operating a tape recorder.  Comments may also be inserted into the journal at any time while recording.  To begin recording a Journal file:

  1. From the File menu in MX, Select Open Journal File.
  2. From the Open Journal File dialog, navigate to the desired folder, specify the journal's File Name, then select Open to continue.
  3. A panel will appear indicating a journal file is activated, select OK to advance to the Journal Recording Methods panel.

    Journal Recording Methods panel

  4. From the Journal Recording Methods panel, select Record & Rationalize, then select OK to continue.

    Journal Control toolbar

  5. Use the Journal Control to Record, Pause, Stop, and Add Comments.

MX Log Files
The input code for every MX session is automatically recorded in a Log file.  These files are placed at the projects home directory.  The name of the Log file is a culmination of the MX Master Document file name, plus the date and the time the log file is created, then appended with a .log extension.

Journal and Log files that are created from MX wizards may include records in preparation of features offered by the wizard, but not currently used.  Further inspection of these records will show that adjustment fields have zero values, thus not altering model data.  It is easier to leave these records instead of wasting time evaluating each records usefulness.

The MX Code

Instructions are given to MX by means of Major Options and their associated Minor Options.

Major Option Details
Major options define the function to be implemented and the models to be used.  Major options are up to 8 characters long, they may be truncated to 4 characters.

Minor Option Details
Minor Options define detail specific actions for strings and points.  All Minor options are 3-digit numbers (000-999).  There are up to 10 items of data associated with each Minor option.  The data items are assigned to fields identified by Field Numbers.  The type of data assigned to each field has been standardized where possible.

1 Existing or Reference string label
2 Subsidiary or Secondary string label
3 New or Amended string label
5 & 6 Start point of application (SPRD)
8 & 9 End point of application (SPRD)

Most Minor options are assigned to a single Major option.  Minor options that operate within more than one Major option are referred to as Global Minor Options.  Refer to MX's Command Language Reference manual for full details of Major and Minor options.  Despite not being the latest version, the MOSS Quick Reference Guide also serves the same purpose.

Standard Point Reference Data (SPRD)
The start and end points of application are known as "Standard Point Reference Data".  This allows the user to specify string points as either coordinates, station value, or point number.  SPRD utilizes fields 5&6 for start points and fields 8&9 for end points.  When both fields 5&6 (or fields 8&9) are filled, values are taken as coordinates.  When just field 5 (or field 8) is filled, the value is taken as station.  When just field 6 (or field 9) is filled, the value is taken as the string point number.

Minor Option Formatting
There are two methods of organizing minor option data, these are known as Fixed Format and Free Format.  All Minor option formats begin each line (record) with the Minor option code, then followed by it's associated fields.

  1. Fixed Format
    Field data items are placed in specific columns.
    1 4-7
    2 8-11
    3 12-15
    4 16-23
    5 24-33
    6 34-43
    7 44-51
    8 52-61
    9 62-71
    10 72-79

  2. Free Format
    Field data items are delimited by commas.  There are two Free Format styles allowing various combinations of organizing data.



Input File Format (Rationalized)

Moss                                        ('Moss' clears any previous errors)
000 Your Name, Modified Date                (000 - comment record)

Autodraw, ON                                 (to revise display graphics)
Major Option,Model1,Model2                   (Major option lines for 3 Models)
Major Option,Model3
Minor Option,field 1,field 2,…….field 10
Minor Option,field 1,field 2,…….field 10     (Minor Option records)
Minor Option,field 1,field 2,…….field 10
                                             (3 or more spaces - comment record) 
Major Option,Model1,Model2                   (Major option lines for 2 Models)
Minor Option,field 1,field 2,…….field 10
Minor Option,field 1,field 2,…….field 10     (Minor Option records)
Minor Option,field 1,field 2,…….field 10
999                                          (999 - terminates a Major option)

Finish                                       ('Finish' designates end of input)

Preparation for Input
If the input file involves the creation of a new model, then it is necessary to anticipate the consequence of multiple file inputs.  To avoid appending model detail with itself, delete the model prior to new input.  Consider it never hurts to delete a model that is not there.  To accomplish this, include the following lines after the 'Moss' record and before the first Major option in the file:

Delete,Model Name
Create,Model Name

The Create major option is included for preparation of detail input.

It may be more appropriate to delete certain strings instead of a whole model prior to running an input file.  In this case, just delete the strings scheduled for creation.  To accomplish this, include the following lines after the 'Moss' record and before the first Major option in the file:

Edit,Model Name
004,3=String Name
004,3=String Name
004,3=String Name      (one 004 line for each string to be deleted)

Display Major Options
Journal files and Log files are likely to include display major options.

Autodraw  Switches automatic drawing on or off.  By default, Autodraw is ON for interactive MX, and OFF for input files.  Automatically drawn strings are displayed in the default style.

Include Autodraw,On at the beginning of an input file in order to update the current display.  Include Autodraw,Off to disengage autodraw.

Autodraw has additional options that might be encounterred.  Autodraw,save is used to capture the current autodraw status.  Autodraw,Restore recalls the saved autodraw status.  These options are not well documented.

Display  Controls the update of the display.  Include Display,On (or 1) to update the display immediately.  Display.Off clears the screen.

Running An Input file

  1. From the File menu in MX, select Input.
  2. From the Open dialog, browse to locate your file, then select Open to run.

New Hampshire Department of Transportation
PO Box 483 | 7 Hazen Drive | Concord, NH | 03302-0483
Tel: 603.271.3734 | Fax: 603.271.3914

copyright 2014. State of New Hampshire