BETA — Preview build
Skip to content
Let the app find and set a way through the layout

Set path ​

Finds a way through your layout and sets all turnouts along it, a bit like GPS navigation. You say where the train starts and where it should go, and Model Train Script works out which turnouts to set. See Paths for how paths work and how to choose a strategy.

Settings ​

SettingDescription
Custom / From profileDefine the path in this action (Custom), or use one of the paths saved in your profile (From profile). The second option only appears when your profile has saved paths.
Set path positionsOnly for Custom: the layout items the path goes through. The first item is the start, the last is the destination, and everything in between is a waypoint the path must pass.
Path strategyOnly for Custom: how to choose when several paths are possible: shortest, first available or random.
LabelOnly for Custom: an optional label that replaces the automatic "from … to …" description.
Require unoccupied pathOnly use a path that does not pass through occupied track, based on your feedback sensors.
Wait if not availableOnly shown with Require unoccupied path. When no free path exists, the action waits until one becomes free, instead of continuing without setting a path.
Show notificationShows a notification with the path that was set, or that no path was available.

How it works ​

  • The path finder follows the connections between the items in your layout. Make sure your layout is fully connected, or valid paths are missed.
  • When no path is found, no turnouts are set and the script continues with the next action. With Wait if not available, the action instead checks again every time a feedback sensor changes, and continues as soon as a free path exists.
  • The execution log shows a picture of the path that was set.

WARNING

Set path only looks at feedback sensors, not at other scripts. When several trains share the same track, use Request clearance as well, so two scripts never claim the same path.

Example ​

A script sends a freight train from the main line into the yard. The path starts at the yard entry signal and ends at the track that joins the yard tracks at the far end. The strategy is random and Require unoccupied path is on, so each run the train is routed over a different free yard track.