Track plan color


:!: For better readability, the terms “Color” for “Track plan color” and “Level” for “Track plan level” is used.


General

The color of the track plans or levels in Rocview can be set according to three different methods.
The methods have a different effect in Rocview sessions, especially when multiple levels and different track plans are opened with Rocview sessions,
that use the same global rocview.ini file.

The special features of module plans are in their own section described.

Solutions are described in General recommended solution for undesirable interactions that can occur.

SVG-Themes

The default setting is set with “properties.xml” files in the directories of the SVG topics. The directories of the SVG topics are located locally on the PC on which Rocview is started. As of 12/2017, “properties.xml” files are included in the following SVG themes after an installation:
CV19, DB, SBB-L, SBB-RHB, Roads, SLIM, SLIM-COLOR, SpDrS60 and SpDrS60-extra
The individual “properties.xml” files contain a color defined for the respective SVG topics. In “properties.xml” files without special settings for a topic, the following line defines the color “white” as default:

<panel red="255" green="255" blue="255" . . . />

See also

When Rocview is started, the “properties.xml” file is read, which is included in the 1st SVG topic 1) . The color defined will be effective if no changes have been made using any of the methods described below. This color is also stored in the “rocview.ini” file for use by Rocview as the default, e.g. after changes to the SVG theme settings no “properties.xml” file is found. Rocrail uses this standard for all layers that have no other settings.

View-Menu

Via Menu → View → Track plan color opens the standard “Color” dialog of the operating system and you can select the color that will be effective for all levels during this Rocview session .

Possible problems:

  • The color is changed after a Rocview restart:
    The color set in the View menu is also saved in the “rocview.ini” file, but if at the next restart a “properties.xml “File is found in the folder of the 1st SVG theme, this overwrites the previously selected color in the” rocview.ini “file.
    To keep the color selected in the View menu, the overriding “properties.xml” file must be deleted from the SVG directory. If the SVG themes are also selected during an update, the “properties.xml” files are copied back to the SVG directories. The problem previously resolved by deleting the “properties.xml” files then reappears.
  • The color is changed without “properties.xml” file after a Rocview restart:
    If colors with the method context menu of the track plan have been set, the color set with the View menu globally on the next Rocview restart may be overwritten with individual colors for the layers contained in the “rocview.ini” file.

Partial Solution

By copying the SVG directories e.g. In the user area, overwriting by “properties.xml” files can be permanently prevented. An update has no access there. In order to use the SVG directories copied into the user area, the SVG-Themen paths be adjusted to it. If later SVG directories are copied to the user area for updating, copied “properties.xml” files may have to be deleted. This solution can not solve both of the above issues when using a global rocview.ini file.

Generally recommended solution

In order to avoid unwanted colors by a globally used “rocview.ini” file, an individual “rocview.ini” file should be created for each track or module plan in the corresponding workspace / directory and used with the Rocview start Command line option ”-i”:

<Program directory path>\rocview -i <Workspace path>\rocview.ini

If with an individual “rocview.ini” file the color for every level or every module for the method Track plan context menu is overridden by “properties.xml” files even if Rocview finds them at startup and reads it in.

Context menu of the track plan

The method described here is the only one that offers the possibility to select the color individually for each level. The required context menu is only accessible if the track plan is set to operate: Menu → Track plan → Operate.
In a free grid field of the track plan (without a symbol) opens with the context menu right mouse button → track plan color the standard “Color” dialog of the operating system and the desired color can be selected. The adjustment of the colors of other layers takes place in the same way. The selected colors are saved in the “rocview.ini” file. The colors are NOT overwritten by a “properties.xml” file during a Rocview restart, if the method is consistently applied to all levels.

Possible problems:

  • All color settings are not saved in the plan file but in the “rocview.ini” file . This means that the set colors of each layer are also effective for other track plans when called with a Rocview session that uses this global “rocview.ini” file.
  • If a track plan is called with a Rocview session that uses a different non-global “rocview.ini” file, the colors stored in this “rocview.ini” file will be applied but may be inappropriate for this track plan. If this inappropriate “rocview.ini” file does not contain colors defined or not defined for all layers, the affected layers will be displayed with the color defined as default in the “rocview.ini” file.

The General recommended solution with an individual “rocview.ini file” also helps with these problems.

Module plans

For module plans, the choice and effect of colors is slightly different than in the descriptions above.

For explanation, the picture shows a module plan (yellow) in which three modules (red, blue and green) are arranged. In order to change the background color (in this case yellow) that is effective in the open space (without modules), the standard dialog “Color” of the operating system is opened within the free area with the context menu right mouse button → background color and the desired color selected 2) . The background color is saved in the “rocview.ini” file and is also effective after a Rocview restart.

If a module plan color using the method View-Menu is changed, Rocview applies this color to all modules for the duration of this session. The return to the individual colors of the modules is only possible with a Rocview reboot.

The selection of an individual color of the individual modules takes place as with the levels of a “normal” track plan with the method Context menu of the track plan.
In a free grid field of the Module (without a symbol) opens with the context menu right mouse button → track plan color the standard “Color” dialog of the operating system and the desired color can be selected.

Note: If a module does not contain a free raster field for calling the context menu, it must be generated in the track diagram of the module. If the size of the module changes, it may be necessary to correct the positioning of modules in the module plan.

The colors of layers and modules are in the “rocview.ini” file in the same XML nodes <tab nr=“x”3) . . . saved. The colors defined in these XML nodes will be effective even after a Rocview reboot.

Example of these XML nodes in a “rocview.ini” file:

  ...
  <tab nr="0" red="255" green="128" blue="128"/>
  <tab nr="1" red="0" green="255" blue="255"/>
  <tab nr="2" red="128" green="255" blue="128"/>
  ...

Since this data of a global “rocview.ini” file affects both the levels of a track plan as well as the modules of a module plan, module plans are urgently advised to use the individual “rocview.ini” file described as the General recommended solution.


1) There is unproven evidence that “properties.xml” files may also be copied from the 2nd - 5th SVG Topic read if the 1st SVG theme does not contain such a file
2) If applicable, the selected background color becomes visible only after scrolling in the plan window.
3) x = numerical index of the level or module

Personal Tools