AnyRail with JMRI
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
- Start PanelPro.
- Select Help ⇒ Locations from the PanelPro menu.
- The User Files Location entry will be used during the AnyRail export. Make a note of it.
- If desired, click on the Open User Files Location button.
This will open the operating system file manager at that location.
- Quit PanelPro.
AnyRail
- If necessary, start AnyRail and open the layout design file.
- Select File ⇒ Export as; select JMRI Layout file.
- 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.
- 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
- Start PanelPro. Unless specifically desired, it is best to not load any other Panels in PanelPro when
loading an AnyRail export file.
- 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.
- Select File ⇒ Load table contents and panels... from the PanelPro menu.
- In the Load Panel File dialog, select the exported panel
name and click on Load.
- 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.
- 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.
- 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.
- Quit and restart PanelPro, load your new panel file and check.
- 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:
- Using the Turnout table,
add your hardware-specific turnouts.
Leave the user name empty.
- Right click each internal turnout and select Move User Name.
- Select the hardware-specific turnout that will have the user name.
- Repeat steps B and C until done.
- Store the xml data file (step 7 above), quit and start PanelPro, load the xml data file.
- 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:
- Either type the correct location of the jpg file in the location field and click on
Continue.
- Or click on Delete or Ignore Errors to skip loading
the jpg image. When the PanelPro file is stored, the reference to the jpg will be removed.
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]