# 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](/docs/manual/profile.md) 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](/docs/manual/layout.md). 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](/docs/manual/layout.md) and assign a route to it. Tapping the item in the [throttle](/docs/manual/throttle.md) executes the route. The item shows the current state: empty circle (off), filled circle (on), or animating (executing).

### Automation scripts

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://modeltrainscript.gitbook.io/docs/manual/automation/routes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
