> For the complete documentation index, see [llms.txt](https://help.auxalia.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.auxalia.com/revit-tools/en/ax-mcp-servers/aufgaben-wiederverwenden/skripte.md). Agents can also search and read this documentation through its [MCP server](https://help.auxalia.com/~gitbook/mcp).

# Scripts

{% hint style="danger" %}
**Not released yet.** This page describes an upcoming release.
{% endhint %}

Save a function the assistant has already run as a script. You can then run it directly from its button in Revit, even without an AI chat.

## When to use scripts

* **Repeat tasks** such as reporting on selected elements or filling in a parameter for several elements.
* **Work without an AI chat.** A saved script can run while the MCP Assistant is off.
* **Share a task with colleagues who lack AI access.** Anyone running the script can use the Revit button without chat or programming knowledge.

See [Workflows and scripts](https://help.auxalia.com/revit-tools/en/ax-mcp-servers/aufgaben-wiederverwenden.md) to compare the available options.

## Save a script

Under [AI-generated functions](https://help.auxalia.com/revit-tools/en/ax-mcp-servers/zugriff/werkzeuge.md#ai-generated-functions), enable **Scripts buttons** and choose an access mode that [allows you to save Scripts buttons](https://help.auxalia.com/revit-tools/en/ax-mcp-servers/zugriff/modi.md#additional-approvals).

Follow the steps under [Save as a script](https://help.auxalia.com/revit-tools/en/ax-mcp-servers/revit-funktionen/ergebnis.md#save-as-a-script). The button appears on the **Scripts** tab in Revit right away.

## Run a script

The **Typ in Kommentar** button in this example writes each smoke damper's type name into its **Comments** parameter. To run a script, go to the **Scripts** tab and click its button. If the script requires input, Revit opens a form first.

![The new button on the Scripts tab](https://2559533644-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKBJu4TPk9tAUbIDUq345%2Fuploads%2Fgit-blob-05b30e728dc668a66aee2f5ab37ceb5cf37991e6%2FRMCP-SK-02-Ribbon.png?alt=media)

### Review the first run

![Preview of a script's first run](https://2559533644-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKBJu4TPk9tAUbIDUq345%2Fuploads%2Fgit-blob-6a699ca50e35811216ea0e12977642dc01c0a17e%2FRMCP-SK-03-Erster-Start.png?alt=media)

On the first run, Revit previews the script's changes. Review the result and click **Apply** to commit the changes and authorize the script. Click **Back** to discard the changes. Revit then runs the script directly each time you use its button. If you edit the script file, Revit previews the changes again on the next run.

A script works in the open model. Use **Undo** to reverse its changes. If a script fails, Revit rolls back its changes.
