That is call "Track scanner" KUID2:117746:23230:1 It works up to TANE and most likely at TRS19. Very accurate. Very often people ask for a way to measure distances and the answers suggest to use box cars or other solutions. I use Track Scanner. Easy and to the point.
I just tried it and it works in TRS19. It uses the GSTrackSearch Class from the scripting API so the game itself calculates the distance between objects along the track path. You have to place 2 track scanner objects on the track route and then request one of them scan the track to find the the other
That is it! I have used it in TANE but it does appear to have an upper limit for the distance it could measure (25kms rings a bell for some reason - but that could just be the distance to the next pub).
I looked at the code in the script and there is no limit in it that restricts the distance searched. However there are a number of limitations built into the GSTrackSearch objects that form the basis for determining the distance:
* TrackSearch will stop after 25km.
* TrackSearch will stop after 500 queries. (search steps thru every object (junctions, signals, markers, speed boards and any other trackside or scenery with track) along the route 1 query per object)
* TrackSearch will stop in certain internal error conditions. (The route would need to be very corrupt for them to occur.)
* And since TANE SP2 - TrackSearch will stop if it reaches the end of currently-available data (I think this is because the mapfiles are now broken up into per baseboard files rather than per route files.)
I haven't seen the last problem on my own route with a main line of 53.66 km (33.56 miles). It required 3 measurements to get the total distance end to end with objects placed at 23.44, 24.90 and 5.33 km apart. I had to go over the whole route a couple of times and set the turnouts correctly. I also found a problem section in the last 5.3 km that I eventually deleted and undeleted 4 track stretches before it found the last object. Everything looked fine and the turnouts were set and reset but it didn't find the last object until I did the del/undel on the 4 pieces of track.
Another problem with it is the track search will fail - terminate early before finding the object - if it reaches the end of track based on its current search path, encounters certain scenery with track based objects or a junction set against the search direction. So it will not automatically find the shorest path to the 2nd track scanner object or it may not even find the 2nd object. You have to make sure that all turnouts are set for the track path you want to determine the distance on. Essentially a train must be able to travel between the 2 track scanner objects with the trunouts as set.
The dialog window will always indicate a number of lists of the trackside objects found and the distance between the 2 objects. However that distance will only be correct if the dialog also indicates "Found Track Scanner Object" in the search. If it does not say that most likely a junction(s) was not set correctly. Check the path and try again.
Bob Pearson