Table of Contents

Generate via route

ContentObjectsRoutes


With Rocrail 6197 a dialog to define "via-routes" has been introduced.
The dialog can be opened by clicking to "Rocview Menu → Track plan → Generate via route…"
-


Parameters

From block

Starting point of the route. Read also: Direction in Rocrail
The + option has to be activated if the locomotive should depart from the + side of the starting block.

The "From block" field can be filled by the keyboard
or by a click selection of the opened list of blocks.


To block

End point of the route. Read also: Direction in Rocrail.
The + option has to be activated if the locomotive should enter the destination block at the + side.

The "To block" field can be filled by the keyboard
or by a click selection of the opened list of blocks.


Via Blocks

Select the via blocks and make sure the blocks are in the correct order.
It is a comma separated list of block ID's without white space (blanks).


Using the "…" button for just one via block will help to generate the via block list in the required order.

Hint: as an additional feature the field "Via Blocks" can be left empty to generate a route from one block to a next block.
This is useful to generate alternative routes with different command sets for example.

Buttons


The dialog includes the standard buttons "?" (Help, link to this Wiki), "Cancel" and "OK".
The buttons "Cancel" and "OK" just close the dialog.

Generated route

If a route could be generated the Route dialog will popup with the new generated route.

The ID will get the extension "_via_[list of blocks]"

The ID may be edited by the user.
Most of the other values must be left unchanged!

The "Description" field is filled with a verbal description of the generated route for example
"from [bk04] via [bk03,bk02] to [bk01]"

"Automatic generated" will be unchecked

Clicking the OK button will save the generated route.
In addition the list of route IDs of the attribute "routeids" of the affected elements is updated with the newly generated route ID. This ensures that the affected plan elements will be properly illuminated.

Clicking the Cancel button will not save the generated route.

see Messages for problematic situations.

</> button

The </> button shows the temporary XML code of the generated route.

The code shows the list of commands.

The code shows the list of elements that will receive a new "routeids" entry.


Messages

In certain problematic situations the user will be informed by a dialog.

No fitting route available

If no fitting route can be calculated
the user will be informed by a dialog.


Overwrite existing route

If the calculated route does already exist
the user will be informed by a dialog.

"No" will leave the existing route unchanged.
"Yes" will overwrite the existing route.

By modifying the route ID
the last generated via-route
can be saved as an additional route.


Examples

Workspace

This plan is used for the examples.

via_routes_generator_20251014.zip

Via route 1

This example shows a normal situation for via routes.
In this case two blocks should be run through by the locomotive. The reason for that does not matter.

The locomotive runs from right to left - from block bk04 (plus side) to block bk01 (minus side) with the via blocks bk03 and bk02.
The sequence of blocks is important for the list of via blocks.

The track elements are illuminated correctly.

Via route 2

This example shows a normal situation for via routes.
In this case two blocks should be run through by the locomotive. The reason for that does not matter.

The locomotive runs from left to right - from block bk01 (minus side) to block bk04 (plus side) with the via blocks bk02 and bk03.
The sequence of blocks is important for the list of via blocks.

The track elements are illuminated correctly.
The signal command is not generated by the via route generator. The command has to be configured afterwards by hand.

Via route 3

This is a negative example.
The via route can not be generated because of a direction track element being placed in the wrong direction.

The user will receive the message "No fitting route available.".

Via route 4

This example shows a more complex situation for via routes.
The destination block can be reached by two alternative routes.
The via route generator takes one route of the alternative routes.
If a not wanted route is taken the user must modify the command list for the generated route afterwards by hand.

The locomotive runs from right to left - from block bk04 (plus side) to block bk11 (plus side) with the via blocks bk03 and bk02 and bk01.
The sequence of blocks is important for the list of via blocks.

The signal command is not generated by the via route generator. The command has to be configured afterwards by hand.
The track elements are illuminated correctly for the left alternative route to bk11.
If the right alternative route should have been taken to bk11 the command list must be modified afterwards.
The routeIDs of the affected previous and actual track elements must also be corrected by hand.