# Routes

Routes let you set multiple accessories to specific states in a single step. Instead of switching each turnout and signal individually, you define the desired configuration once and execute it whenever needed.

For example, a route "Main line entry" could set turnout 1 to straight, turnout 2 to diverging, and the entry signal to green — all with one tap.

## Creating a route

Navigate to **Routes** in your [profile](https://modeltrainscript.gitbook.io/docs/manual/profile) and tap the **+** button. Give your route a name, then add the accessories it should control.

## Configuring accessories

Each route contains a list of accessories and the states they should be set to. For every accessory entry you can choose between two modes:

* **Linked to layout** — Select an item from your [layout](https://modeltrainscript.gitbook.io/docs/manual/layout). The route uses the accessory addresses configured on that item and stays in sync if you change the layout configuration later.
* **Manual** — Enter one or two accessory addresses directly and specify their on/off state. Useful for accessories that are not on your layout.

You can reorder the accessories in the list — they are executed from top to bottom.

## Execution

When a route is executed, it sends commands to the command station for each accessory in sequence. The route tracks its execution state:

* **Off** — The route is idle.
* **Executing** — Commands are being sent.
* **On** — All accessories have been set and match the configured states.

A running route can be cancelled, but accessories that have already been switched will not be reverted.

## Using routes

Routes can be activated from three places:

### Throttle

Routes marked with **Show in Throttle** appear in the routes section of the automate tab. Tap to execute, tap again to cancel while running.

### Layout

Place a **route** or **track route** item on your [layout](https://modeltrainscript.gitbook.io/docs/manual/layout) and assign a route to it. Tapping the item in the [throttle](https://modeltrainscript.gitbook.io/docs/manual/throttle) executes the route. The item shows the current state: empty circle (off), filled circle (on), or animating (executing).

### Automation scripts

Use the [Set Route](https://modeltrainscript.gitbook.io/docs/manual/automation/scripts/action/layout-control) action in a script to execute a route as part of an automated sequence — for example, setting up turnouts before releasing a locomotive.
