Using JMRI® to Operate Trains
OperationsPro: Importing Cars from a File
Import cars from file
Selecting Import cars from file from the
Cars -> Tools menu opens a system Open
dialog box to allow you to select the file of your choice
that meets the criteria defined below.
Note that OperationsPro will only add Cars that don't yet
exist in the program's Car Roster. If a Car already exists,
the import of that item will be skipped. You must also create
the Locations and their Tracks before importing Cars into the
OperationsPro program that use these place names.
To improve the speed of the Car import, you may close the Cars window. It takes significantly more processor cycles to update the Cars panel during Import than to actually import the Car records.
After importing your Car data, you must save the newly added entries if you want to keep them as part of your Roster. Select any Car in the Cars window list 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 records in a database,
you can import these into the program. The Import function
requires an ASCII 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 example records in 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:
- Car Owner's Name
- Date Built
- Location
The following shows two example records in 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 delimiters:
comma
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.