set acceptghost in xml script

Post Reply
calvin
Posts: 33
Joined: 25.01.2014, 00:30

set acceptghost in xml script

Post by calvin » 30.10.2018, 01:54

Hi.
as part of a script aka "startShunting.xml" i want to set a block to allow ghost ..

I have tried this but it dosnt seam to set it
<bk id = "B_Hbf1" acceptghost = "true" />
plus some other stuff signals, close blocks etc...

note i would also have a "stopShunting.xml"

so basic q: is acceptghost allowed to be updated in a xml script?

Many thanks

rjversluis
Site Admin
Posts: 39051
Joined: 10.04.2006, 08:48
Location: Speyer, Germany
Contact:

Re: set acceptghost in xml script

Post by rjversluis » 30.10.2018, 07:32

Hi Calvin,
calvin wrote:

Code: Select all

<bk id = "B_Hbf1" acceptghost = "true" />
this is not wellformed XML.
Blanks between attributenames and the equals signs are not allowed.
Blanks between the equals signs and attribute values are not allowed.

Try this:

Code: Select all

<bk id="B_Hbf1" cmd="startacceptghost"/>

<bk id="B_Hbf1" cmd="stopacceptghost"/>
Alternatively you can set the block to shunting type:
https://wiki.rocrail.net/doku.php?id=bl ... ls-en#type
https://wiki.rocrail.net/doku.php?id=bl ... lock_types

calvin
Posts: 33
Joined: 25.01.2014, 00:30

Re: set acceptghost in xml script

Post by calvin » 31.10.2018, 01:10

ok..

not sure where those spaces came from :)

but startacceptghost and stopacceptghost dont seam to work (as not ticking box in block properties)

i have (hoping) a button on layout to say i am shunting, which on the layout requires head shunting onto main line. which i want to close (for auto mode running in background), do some shunting manualy (fun bit :) ) and then push button, open block etc and dispatch train from platform with new wagons etc.

so my action scripts (added to button red/green) are
start shunting

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<xmlscript>
  <bk id=“Platform8” cmd="startacceptghost"/>
  <bk id="Platform8" state="closed"/>
</xmlscript>
and stop shunting

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<xmlscript>
  <bk id=“Platform8” cmd="stopacceptghost"/>
  <bk id="Platform8" state="open"/>
</xmlscript>
so can allow ghost be set whilst auto mode is running ?

Many thanks

calvin
p.s updated to latest version and might build a striped down plan to test/upload as plan is complex :)

Besra
Moderator
Posts: 3644
Joined: 10.08.2009, 17:54
Location: North Rhine-Westphalia, Germany

Re: set acceptghost in xml script

Post by Besra » 05.12.2018, 08:51

Hi Calvin,

this might be solved already, if not there is something in the code which I regard with suspicion:

Code: Select all

“Platform8”
"Platform8"
The quotation marks are different. May or may not be a problem, idk...

Regards
Bernd

rjversluis
Site Admin
Posts: 39051
Joined: 10.04.2006, 08:48
Location: Speyer, Germany
Contact:

Re: set acceptghost in xml script

Post by rjversluis » 05.12.2018, 08:55

Hi Bernd,
Besra wrote:
05.12.2018, 08:51
The quotation marks are different. May or may not be a problem, idk...
correct. This quotation is not allowed and will generate an error at parsing the XML.

Post Reply

Return to “Automatic mode”