Using JMRI® to Operate Trains

Importing Locomotives

Back

Back to Index


Import locomotives from roster

If you already have a DecoderPro® roster created when programming decoders, you may import them into the Operations program. All locomotives that are not already in your Operations roster will be imported and a message will be displayed informing you of how many locomotives were imported. This way you can use this tool any time you add locomotives to your DecoderPro® locomotive roster. The DecoderPro® locomotive roster doesn't have the locomotives length, so a default length is entered for you. You should correct the locomotive length if you want the program to correctly calculate your train lengths.

Now we should have imported your programming engine roster into the Operations Engine roster you will need to edit the entries to add the attributes that are required for operations but were not needed in the Engine Roster file when you programmed the decoders.

Engine Roster

These engines were imported from JMRI Roster, so we will need to edit them to set the correct length, Consist, Location as required.
Press to the right of the engine that you wish to edit and the Edit Engine window is opened

edit engine

I now edit the Road to was in the roster as Union Pacific

Road Number was imported correctly.

Model was imported correctly

Type was not in Roster so set to

Length was set to default so edit to which is the correct length of body not including couplers.

Horsepower was not imported, so set to as this model was basically two 2500 HP units on a single frame.

Location is not imported from the Roster, So I located the locomotive at and set on .

Optional

Consist not set.

Built not entered.

Owner is not imported, so selected .

No Comment for this locomotive

Now to store press and this will add the edits to any edited menu item.

updates your Operations Locomotive Roster.

 

Take a look at the Edited Operations Locomotive Roster, note the highlighted entry which we just edited.

 

Engine Roster updated

The to the right of selected locomotie, when pressed, opens the Set Locomotive Location window and allows you to override the program and set an locomotive at a location that is defined in your Operations data base. Dialog preceeds the Set Locomotive window

release

set locations

Menu is standard for DecoderPro®.

Locomotive displays the selected engine.

Type is displayed

Status
Out of Service
Takes the Locomotive out of service and will not be assigned by the build program

Location
Name and Track you can set the locomotive at any defined location on your layout.
Auto limits selections to valid locations

Optional--Normally Set by Program--

Destination optionally set the Name of location and the Track .

Train optionally set the train.

press to save the locomotive locations that you have set.

Close the window when completed.

Import locomotives from a File

The import from file function requires an ACSII text file, with one line for each locomotive. The import order is locomotive number, locomotive road name, locomotive model, and locomotive length. The following shows two examples of the correct format:

236 UP RS4 40
5578 SP SW1200 42

Each line can start with a space and multiple spaces between fields is okay. Optionally you can include additional information in the following order, owner name, date built, and location. The location can have two fields, the location name followed by the location's siding or yard name separated by a hyphen. The following shows two examples of the correct format:


236 UP RS4 40 AT 1930 Home Town USA - locomotive Terminal
5578 SP SW1200 42 DB 1934 York - York locomotive Yard

If you prefer to use comma delimiters instead of spaces, place the word "comma" at the start of your import file and use commas instead of spaces. The following are two examples of importing locomotives with comma deliminters.

comma
236,UP,RS 4,40,AT,1930,Home Town USA,-,locomotive Terminal
5578,SP,SW 1200,42,DB,1934,Town of York,-,York locomotive Yard

You need to be very careful with spaces when importing a comma delimitated file. The program will include leading and trailing spaces if they exist between the commas.

Note that the program will only add locomotives that don't exist in the program's locomotive roster. It the locomotive already exists, it will be skipped by the program.

After importing your locomotives, you must save them if you want to keep them as part of your roster then edit them as you done for imports from the programming roster above.. Select any locomotive in the locomotive window by pressing and then press that can be found at the bottom right of the Edit locomotive window


Back

Back to Index