The JMRI Manual
Download 3.0
Installing JMRI
Starting JMRI Operations
Using JMRI Operations

Using JMRI® to Operate Trains

Importing Cars from a File


Back to Index

Opens a Windows Open dialog box to allow you to select the file of your choice and a file that meets the criteria defined herein. Note that the program will only add cars that don't exist in the program's car roster. It the car already exists, the import will be skipped by the program. You must also create the locations and their tracks before importing the cars into the operations program.

To improve the speed of the car import, you can close the Cars window. It takes significantly more processor cycles to update the cars panel than to actually import the cars.

After importing your cars, you must save them if you want to keep them as part of your roster. Select any car by pressing the edit button and then press the that can be found at the bottom right of the Edit Car window.

If you already have a list of cars in a database, you can import the cars into the program. The import function requires an ACSII text file, with one line for each car. The import order is car number, car road name, car type, car length, car weight, car color. The following shows two examples of the correct format:

336 GCR Flat 40 3.8 Black
655578 UP Boxcar 40 3.8 Yellow

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:

336 GCR Flat 40 3.8 Black AT 1930 Home Town USA - George's Oil Terminal
655578 UP Boxcar 40 3.8 Yellow DB 1934 York - York Freight

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 cars with comma deliminters.

336,GCR,Flat Car,40,3.8,Black,AT,1930,Home Town USA,-,George's Oil Terminal
655578,UP,Tank Car,40,3.8,Yellow,DB,1934,York,-,York Freight

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.


Back to Index