News:

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 :) )

Main Menu

API to read track sections from .ANY file?

Started by TWRackers, November 22, 2016, 07:00:51 PM

Previous topic - Next topic

TWRackers

I have an application where I'd like to extract the geometry of the track sections in my .ANY file so I can display the layout on my screen and dynamically change the color of blocks based on my criteria (block power assignments, route assignments, etc.).  Since the .ANY file format appears to be binary as opposed to XML or some other text-based format, is there either an API that will let me extract the track sections, or an export format that will allow me access to this information?

David

What is the other application?

There are various ways to export, for instance to JMRI or Trainplayer.
David Hoogvorst. Founder and Owner of DRail Software. Creator of AnyRail.

TWRackers

Coming back to this after over 5 years...

Exporting a layout to TrainPlayer produces an .XML file which is readable by several programming languages with the right libraries.  I've succeeded in importing layouts into Python code using .XML files.