Visitar URL original
Execution Overview | RevitDevTool
Skip to main content

Execution Overview

Use Execution when you want to run automation code inside the host without a slow rebuild/restart loop. Turn on the Execution toggle in the panel to see your scripts, then use Load Scripts or Load .NET Assembly to add sources.

Running a script from the RevitDevTool panel

Execution has two main user-facing paths:

PathUse when
ScriptingYou want quick iteration from source files without creating a full add-in project
.NET AssemblyYou want to run compiled commands from an add-in/tool assembly

Capability Table​

What each runtime supports:

RuntimeEntry suffixDebuggerPackages / referencesHosts
CPython*script.pyYes — attach your IDE (preferred port 5678)Pixi (conda-forge + PyPI) default; pyRevit CPython engine fallback. uv sidecar only on Plant 3D, where the host already embeds CPythonRevit, AutoCAD, Civil 3D (CPython 3.14). Plant 3D uses its built-in CPython with uv — see Modern Python Scripting
IronPython*_ipy_script.pyYes — attach your IDE (preferred port 4567)No PEP 723 / package managerRevit + AutoCAD-family
C# script*script.csxYes — attach to host process (VS / VS Code)#r "nuget: …" via NuGet resolverRevit + AutoCAD-family
F# script*script.fsxYes — attach to host process (VS / VS Code)#r "nuget: …"; cache %APPDATA%\RevitDevTool\nugetRevit + AutoCAD-family
.NET assembly.dllYes — attach to host process (VS / VS Code)Compiled referencesRevit + AutoCAD-family

IronPython engine selection​

HostEngine
RevitpyRevit engine first when pyRevit is loaded; embedded IronPython 3.4.2 fallback
AutoCAD-familyBundled IronPython 3.4.2 (no pyRevit)

IronPython execution and IronPython pytest routing (test_*_ipy.py) share the same Revit engine preference.

Folder Rules​

A folder is visible as a script command only if it contains at least one supported entry file:

*script.py
*_ipy_script.py
*script.csx
*script.fsx

Build output, package folders, virtual environments, docs, and tooling folders are ignored.

Choose The Right Mode​

NeedRecommended mode
Explore model data quicklyCPython scripting
Use pandas/polars/numpy/shapely-style packagesCPython scripting
Debug Python from VS Code or PyCharmCPython scripting — Debugging
Reuse IronPython or pyRevit-style codeIronPython scripting
Try a small typed snippetC# script — C# Scripts
Prototype with F# interactive-style codeF# script — F# Scripts
Run compiled commands without Add-In Manager.NET assembly
Build a production add-in command.NET assembly

Package manager​

The Execution view lists the packages your scripts have resolved across all runtimes, grouped by source: NuGet, conda-forge and PyPI. A Latest badge marks the newest version in the cache.

Package manager in the RevitDevTool panel

Dependencies are declared in the script itself: see Python Dependencies and NuGet Dependencies.

Host Context Reminder​

Host API calls must happen in valid host API context. Commands launched through RevitDevTool are designed for that workflow. Background/modeless UI code still needs to route host API work back through the supported host execution path.

More Pages​