Working with JMRI®
Apps with JMRI Connections
Smartphone Apps (third party links)
JMRI Clinics
Archived JMRI presentations on NMRA National Conventions and elsewhere
JMRI User Gallery
People have used JMRI to do some great things for the model railroad community.
Our Gallery page highlights some of these.
Apps using JMRI
Showcase of third party apps that connect to JMRI
JMRI Code Visualisation
Get an impression of the parts that make up JMRI Code
Applications
By the community of JMRI.org:

JMRI Help:

Contents Index
Glossary FAQ

Donate to JMRI.org

AnyRail with JMRI

AnyRail logo

The AnyRail layout planning software can now export a layout design as a JMRI panel file that can be loaded by PanelPro. See the AnyRail documentation.

Prerequisites

The AnyRail software should be the latest version. Version 6.29 added support for exporting AnyRail designs that use flex track.

JMRI 4.18 or later (4.20 recommended) with at least Java 8. See JMRI Setup for new installs.

For people new to JMRI, or new to PanelPro and Layout Editor, do the Getting Started with PanelPro tutorial.

Create the AnyRail design

Create the layout design using the AnyRail tools

Use the Label feature to assign names to turnouts because those labels will be used as User Names in JMRI which will be easier to understand than the automatically generated names. Also, if Blocks will be used in PanelPro, use the Label feature to assign names to sections because those labels will be used as Block User Names in JMRI.

Export the AnyRail design as a JMRI PanelPro file

JMRI

  1. Start PanelPro.
  2. Select Help ⇒ Locations from the PanelPro menu.
  3. The User Files Location entry will be used during the AnyRail export. Make a note of it.
  4. If desired, click on the Open User Files Location button. This will open the operating system file manager at that location.
  5. Quit PanelPro.

AnyRail

  1. If necessary, start AnyRail and open the layout design file.
  2. Select File ⇒ Export as; select JMRI Layout file.
  3. In the Save as dialog, navigate to the user files location noted earlier. The exported file name will default to the AnyRail file name with .xml replacing .any, but the name can be changed to something more descriptive if desired.
  4. Click on Save. Two files will be created:
    • The PanelPro file which contains a Layout Editor panel and the related tables.
    • A jpg image of the AnyRail layout design (including the background and scenery).

Using the exported PanelPro file

  1. Start PanelPro. Unless specifically desired, it is best to not load any other Panels in PanelPro when loading an AnyRail export file.
  2. Select Help ⇒ System Console... from the PanelPro menu. This may be important for the first load of the exported PanelPro file to see any errors when loading.
  3. Select File ⇒ Load table contents and panels... from the PanelPro menu.
  4. In the Load Panel File dialog, select the exported panel name and click on Load.
  5. Review the system console for warnings or errors during the load step. If errors or warnings have occurred and they don't have any meaning (to you), use the Copy to clipboard button and paste the clipboard contents into a message to the JMRI User Group.
  6. The following content is now available in PanelPro:
    • The Layout Editor panel: It is displayed in Edit mode to facilitate post import modifications. See Layout Editor Help for details on using Layout Editor.
    • The exported jpg image file is loaded with the xml file and acts as a background for the track plan.
    • The Turnout table: Tools ⇒ Tables ⇒ Turnouts will have the list of turnouts. If labels had been assigned to the turnouts in AnyRail they will be used for the user name. If not, a cryptic user name will be assigned.
    • The Block table: Tools ⇒ Tables ⇒ Blocks will have the list of blocks. The AnyRail Sections are exported as JMRI Blocks. If labels have been assigned to the AnyRail Sections they will be used for the user name. If not, a cryptic user name will be assigned.
  7. If changes have been made to the imported file, store the changes using File ⇒ Store ALL table content and panels... in Layout Editor or File ⇒ Store ALL table content and panels... using the main PanelPro menu. Whether to replace the existing file or use a new file name depends on personal file management philosophy. If Overwrite is selected, the old file will be moved to the backupPanels directory with the date and time added to the file name.
  8. Quit and restart PanelPro, load your new panel file and check.
  9. AnyRail defines Turnouts as "Internal" devices with system names like "IT1", "IT2", etc. These will not operate the hardware on your layout. To do that, you have to switch to hardware-specific Turnout definitions for your hardware: NCE, LocoNet, DCC+ or whatever you're using. To do this:
    1. Using the Turnout table, add your hardware-specific turnouts. Leave the user name empty.
    2. Right click each internal turnout and select Move User Name.
    3. Select the hardware-specific turnout that will have the user name.
    4. Repeat steps B and C until done.
    5. Store the xml data file (step 7 above), quit and start PanelPro, load the xml data file.
    6. Test the results by operating the turnouts on the Layout Editor panel and making sure each one operates the turnout on the layout. You can also operate the turnouts directly from the Turnout Table.

Additional notes for using AnyRail's export files

Helpful Scripts

The AnyRailExportAdditions.py script enhances the generated Block and Turnout definitions, creates Sensors and assigns them to the corresponding Blocks. Both Sensors and Turnouts are created to match your default hardware Connection.
Note: this automatically performs the "moves" described above.
See [this page] for usage information and additional suggestions.

The AddOccupancyIconsToPanel.py script will create and place SensorIcons and BlockContentIcons for each occupancy Block on a panel. (Not AnyRail-specific)

The AnyRailBuildBlockSensorList.py script may be useful when doing large migrations with block sensors. See the associated PDF instructions (Original ODT file .odt file) and README.md files for more information.

Missing jpg image file

If the exported PanelPro file and its related jpg file are manually moved to a different location (or if exported to a different location than the User Files Location), the jpg image will not be found during the first PanelPro load. A Icon Not Found dialog will be displayed. There are two optons:

Other errors or unexpected results

Use the system console, Help ⇒ System Console..., to open a window that has details on JMRI and can contain warnings and errors.

Additional Resources

Steve Todd has some additional tips and best practices for making the most of the AnyRail Export here:
[AnyRail Export to JMRI]