• Welcome to AnyRail Model Railroad Forum. Please login or sign up.
April 17, 2021, 12:31:06 am


Due to heavy spamming attempts on this forum, automatic registration has been disabled. We will approve registration requests as quickly as possible (unless you're a spammer of course :) )

Reference ID's

Started by Born59, January 05, 2021, 10:32:47 am

Previous topic - Next topic


Hi all enthusiasts

I am converting drawings for a friend to a layout and we hope to automate this via a web type console to change the points.

He has a group of mates around and they take control of certain areas of the layout moving carriages and trains about let us say in the rail yard for one, so the idea is to mark of a certain area of the screen using a boxing method and give this an ID, the user then logs in to the system and they get to control the points within that area.

All the points are in a database with their respective Digital I/O connections.
I want to use the Trainplayer XML output file or a new output in the same format to map between the database and the points in the layout, however there is no reference between the two and I was hopeful this would be something you could add as an update.

There is an ID for the points now, but this is not exposed in the details panel and it is of a numerical format, I need a textual reference back to the database.

Hopefully, it would look something like this

With the option to show the reference on the layout, helps to make sure all points have been set.

And the output file would show the reference.

I hope all this makes sense.


Perhaps you can use the 'label' function for this. The labels were introduced to identify track elements, especially turnouts.

When you click on a point, you can set its label.
David Hoogvorst. Founder and Owner of DRail Software. Creator of AnyRail.


Oh, you had me going here, just tried it and it is not exposed in the XML.


You are right, but you probably shouldn't use the Trainplayer export for this. It is an format only used as an intermediary between AnyRail and Trainplayer, and may change in the future.

It's better (but perhaps not easier!) to use the JMRI output format. This format is documented and maintained by the JMRI community, and the labels are in there under the 'turnoutname' attribute of the 'layoutturnout' element.
David Hoogvorst. Founder and Owner of DRail Software. Creator of AnyRail.


Ah, I see

now just have to make sense of the other bits in there to see if it can be redrawn in a new web app.

Thanks, this just might work, must say I did not notice the label parameter when I was laying out the tracks

this is what I have so far still yet to finish it.


The JMRI xml output is really convoluted and difficult to parse, would it be possible for Anyrail to add a new PURE xml output much like the Trainplayer one but does not get changed to suit Trainplayers format when they modify their program, just appended when new things come along.

AnyRails own XML output for people who want to play. ;-)


OK, it has taken some time to write the parser for the JMRI XML file enabling me to extract all the controllable parts to a database.

Unfortunately it does not output cross rails with the label tag, it does export this

But IT270 does not equate to anything else in the file, so loosing my control points 162,161
i.e. when drawing the track on the screen and going to click the crossrail there is no back reference to the digital channels it is on.

Please in the next version can you add your own XML output Very similar to the Trainplayer one would be excellent and would mean very little work to create it, all you have to do is add the Labels to everything.

What do you think?


I'm sorry, but we can't make changes or additions for just one user's project.

AnyRail is a standard product having an enormous amount of users, so this is not the way to go.

The TrainPlayer export is not documented, so 'abusing' it is okay, but we cannot guarantee that it will continue to work as it is in the future. We only guarantee an integration with TrainPlayer.

The JMRI export is fully documented by JMRI, and we can't just add random things to it, as that might clash with anything they will change in the future.

I'm sorry!
David Hoogvorst. Founder and Owner of DRail Software. Creator of AnyRail.


OK I am using the JMRI XML output and think there maybe a bug

in all segments related to turnouts you get the Turnoutname = whatever you place in the label field in anyrail
but TurnoutnName is missing from all slips, so i can't identify it's connection back to the I/O table I have created to control the layout.

laoutturnout xml output

0 {16}
_ident : TOR493
_turnoutname : 48-E188
_type : RH_TURNOUT
_connectaname : T-I-TOR493
_connectbname : T-EL-TOR493
_connectcname : T-ER-TOR493
_xcen : 3571.07
_ycen : 1439.26
_xb : 3589.72
_yb : 1439.46
_xc : 3589.25
_yc : 1443.11
_continuing : 2
_disabled : no
_disableWhenOccupied : no
_class : jmri.jmrit.display.layoutEditor.configurexml.LayoutTurnoutXml

but in the slips output no Turnoutname

0 {13}
_ident : SL1235
_slipType : DOUBLE_SLIP
_connectaname : SL-A-SL1235
_connectbname : SL-B-SL1235
_connectcname : SL-C-SL1235
_connectdname : SL-D-SL1235
_xcen : 3793.63
_ycen : 311.45
_xa : 3775.73
_ya : 313.49
_xb : 3775.7
_yb : 309.72
_class : jmri.jmrit.display.layoutEditor.configurexml.LayoutSlipXml

Could you have a look at this please



You are correct. For slips, this is not the JMRI schema.
I'll ask the JMRI team for details.
David Hoogvorst. Founder and Owner of DRail Software. Creator of AnyRail.


Oh I got very exited when starting up Anyrail and up popped an update screen, rapid download test track exported.
alas no update on the JMRI file still no Slipnames

It would be good if the turnout gave any relevant information


This 'IT270' just does not refer to anything, the Ident here would be good i.e.  SL1235


Unfortunately that's not possible. The JMRI definition requires 'IT' + sequence number.

I know it's annoying that the JMRI output nor the TrainPlayer output contains exactly what you need, but we really can'y change either.
David Hoogvorst. Founder and Owner of DRail Software. Creator of AnyRail.