Inspired from a discussion going on in a thread in the forum (by the way my special thanks to Mr.Den for his clever idea), I decided to write this command that lets a driver to control a diamond crossing with the signals around it and releases the diamond crossing automatically once the entire train leaves a specified trackmark. The setup however requires a little work on the user side. You need to follow the steps below.
1) place a stretch of track near a diamond crossing. The track must be completely disconnected from the rail network in order to eliminate any conflict.
2) place a trackmark on top of this stretch of track and give a name representative of the diamond crossing
3) place trackmarks around the diamond crossing so that they can be used to release the diamond crossing and reset the signals to automatic states once the entire train leaves one of these trackmarks. These trackmarks can also be used to stop the train and ask permission to control the diamond crossing using this command.
4) place some signals at appropriate places around the diamond crossing.
5) download InputTable rule (kuid:131986:1012) if you havn't done already and include it in your session. Then open the InputTable rule editor and type the following 'dcross' statement on a new line
where 'dcross' is a (command) name that can be recognized by the driver command.
control_name is any name you wish to give for controlling the diamond crossing. This name will also appear in driver command's menu. So it is importatnt.
control_trackmark is the name of the trackmark placed on top of the track stretch. Name it such that it represents the diamond crossing
release_trackmark is the name of the trackmark to automatically release the diamond crossing to the next available driver once the entire train leaves the trackmark.
signal_1, signal_2, ... are the names of the signals to block (i.e., to turn their lights to red) while the diamond crossing is under a driver's control. They will automatically be set to 'automatic' state once the diamond crossing is released. On this line you can enter as many signal names as the line permits.
the control name is mycontrol and the trackmark mycrossing is placed on the track stretch. Once the train leaves tm3, the crossing will be released. The signals with signal names sig2 and sig4 will be turned to red once the driver is given permission to control and released to 'automatic' once the train leaves tm3.
Once everything is setup, use ControlDiamCross driver command and assign the control name(s) to the driver(s) in the session.
As a last note, sample layouts with sample sessions are provided for download from DS. Their names and kuid numbers are
Layout: ContDiamCross (kuid:131896:1037)
Session ContDiamCross (kuid::131986:1039) (single crossing)
Layout: ContDiamCross2 (kuid:131986:1042)
Session: ContDiamCross2: (kuid:131986:1044) (multiple crossings)
It is realy easy once you download this layout along with the session