Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
119 commits
Select commit Hold shift + click to select a range
eb8563f
Fix panel background tab lookup
cursoragent Feb 2, 2026
b1c0610
feat: add support for the before and after directives
romangolev Feb 3, 2026
a0f2853
Merge pull request #3070 from pyrevitlabs/cursor/loader-panel-backgro…
jmcouffin Feb 3, 2026
0778c3c
Add CLAUDE.md for AI assistant guidance
claude Feb 3, 2026
cce42be
Clarify branch structure in CLAUDE.md
claude Feb 3, 2026
d4bc1f7
Emphasize develop as starting branch in CLAUDE.md
claude Feb 3, 2026
2b91a85
Add documentation website URL to CLAUDE.md
claude Feb 3, 2026
b4d1376
Distinguish main website from technical docs in CLAUDE.md
claude Feb 3, 2026
0cae3aa
Merge pull request #3075 from pyrevitlabs/claude/update-claude-md-J0VOj
jmcouffin Feb 3, 2026
2a4464b
Update supported Revit versions and .NET framework
jmcouffin Feb 3, 2026
6d0eaa6
feat: update newloader to parse unicode-safe userextensions paths
romangolev Feb 4, 2026
215f97a
fix: add multiline support for title in bundle files
romangolev Feb 4, 2026
6018c06
fix: make invoke and url buttons work
romangolev Feb 5, 2026
fc8ec59
Update pick_point() in pyrevitlib\pyrevit\revit\selection.py
Denver-22 Feb 5, 2026
64845b2
chore: update dlls
romangolev Feb 5, 2026
dffd6a1
Changed RevitProduct.cs logging to Debug instead of warning. Adde reg…
iorhanV Feb 5, 2026
62f74a1
Merge pull request #3080 from Denver-22/develop
jmcouffin Feb 5, 2026
7603edb
Merge pull request #3081 from iorhanV/3077
jmcouffin Feb 5, 2026
41d1abc
Improve registry key handling for Revit products
jmcouffin Feb 5, 2026
8f0a635
new generic external event handler for modeless scripts with develope…
Wurschdhaud Feb 7, 2026
f9f4b51
- utilize new external event helper method
Wurschdhaud Feb 7, 2026
82aa05e
utilize new external helper method
Wurschdhaud Feb 7, 2026
867bab1
utilize new external helper method
Wurschdhaud Feb 7, 2026
86fe38b
add comment explaining lambda
Wurschdhaud Feb 7, 2026
1097763
remove lambda for function
Wurschdhaud Feb 7, 2026
51045df
add lstrip()
Wurschdhaud Feb 7, 2026
69b344b
remove nested try-catch as per copilot
Wurschdhaud Feb 7, 2026
3d6e3dc
refactor: extract IronPython forms backend
OriAshkenazi Jan 29, 2026
9d0aace
feat: add CPython stubs for pyrevit.forms
OriAshkenazi Jan 29, 2026
52d68a5
fix: flush output stream under CPython
OriAshkenazi Jan 29, 2026
96227a6
docs: document pyrevit.forms facade and CPython contract
OriAshkenazi Jan 29, 2026
5e2ef55
Update extensions/pyRevitDevTools.extension/pyRevitDev.tab/Debug.pane…
jmcouffin Jan 29, 2026
45f8fa8
Update docs/architecture.md
jmcouffin Jan 29, 2026
5129c2f
fix: address forms PR review feedback
OriAshkenazi Feb 1, 2026
0e17589
refactor: rename forms backends
OriAshkenazi Feb 1, 2026
d2cf05c
fix: address remaining PR review threads
OriAshkenazi Feb 5, 2026
3910867
docs: remove extra forms backend note from architecture overview
OriAshkenazi Feb 8, 2026
3ebf106
fix: pass title to remedy error of pick tool
romangolev Feb 9, 2026
b692cf9
fix: pass title to remedy error of Isolate tool
romangolev Feb 9, 2026
33dded4
feat: add support for name_config.py config names
romangolev Feb 9, 2026
efb1531
chore: update dlls
romangolev Feb 9, 2026
33c18a3
fix: add title to renumber tool to remedy the wpf error
romangolev Feb 9, 2026
d62055c
fix: normalize config reader to get correct locale
romangolev Feb 9, 2026
1ae5ed2
new feature option - temporary sectionbox
Wurschdhaud Feb 10, 2026
99c9b31
Merge branch 'develop' into develop
romangolev Feb 10, 2026
fad75f4
Merge branch 'develop' of github.com:romangolev/pyRevit into develop
romangolev Feb 10, 2026
b012fc8
fix: copilot issues handled
romangolev Feb 10, 2026
54403d3
fix: remedy csproj loader warning
romangolev Feb 10, 2026
2e0769e
chore: update dlls
romangolev Feb 10, 2026
4bfc213
fix: cache scanned Revit products and skip scanning on every new run
romangolev Feb 10, 2026
ef16386
Refactor list box mouse down event handling
tay0thman Feb 12, 2026
d66fe45
Removed Dead Code, Better Conditional criteria
tay0thman Feb 12, 2026
799094c
Rename extension and update repository URLs
jmcouffin Feb 12, 2026
da3e725
Merge pull request #3086 from Wurschdhaud/new-helper-for-external-events
jmcouffin Feb 12, 2026
55c7188
Update extensions/pyRevitTools.extension/pyRevit.tab/Analysis.panel/C…
jmcouffin Feb 12, 2026
ecfaf83
Merge pull request #3071 from romangolev/develop
jmcouffin Feb 12, 2026
f249cfc
Improve error handling in list_box2_mouse_down
tay0thman Feb 13, 2026
d96809d
Merge branch 'develop' into tay0thman-patch-1
tay0thman Feb 13, 2026
2f87b38
Merge pull request #3091 from pyrevitlabs/tay0thman-patch-1
jmcouffin Feb 13, 2026
27591cb
Merge branch 'pyrevitlabs:develop' into enhancement-sb-temp
Wurschdhaud Feb 13, 2026
7a3d464
rename script files, to avoid namespace collission for cached importe…
Wurschdhaud Feb 13, 2026
23b6193
feat: add logging for errors during parsing
romangolev Feb 13, 2026
fd0ad20
Merge remote-tracking branch 'upstream/develop' into develop-loader
romangolev Feb 13, 2026
3179358
chore: update dlls
romangolev Feb 13, 2026
08dcdf6
fix: make the SectionBox config work again
romangolev Feb 13, 2026
4f3023d
fix: add dynamic and rich combobox elements
romangolev Feb 13, 2026
834d5a4
added new command temp switch to sb, added tooltips to other action b…
Wurschdhaud Feb 14, 2026
6a3d8b1
remove useless logging, reuse pickle from script, fix wrong functioncall
Wurschdhaud Feb 14, 2026
e58ad9f
feat: adapt YamlDotNet to align work of new loader parser with the le…
romangolev Feb 15, 2026
a3dec97
fix: honor inline script override for the engine type
romangolev Feb 15, 2026
e05961b
fix: point to existing dotnetyaml file to remedy dlls duplication
romangolev Feb 15, 2026
9c79f54
- removes username and password, replaces with token, support for any…
Wurschdhaud Feb 15, 2026
0dd9fb9
Fix typos in docstrings for extension management methods in Extension…
jmcouffin Feb 15, 2026
a4276ee
Refactor toggle button content assignment in Extensions.smartbutton s…
jmcouffin Feb 15, 2026
5e012a0
Remove unnecessary whitespace in search box clear function in Extensi…
jmcouffin Feb 15, 2026
efe35d3
Update ExtensionsWindow.xaml to increase width of the window and adju…
jmcouffin Feb 15, 2026
915dddb
Add dynamic resource for custom extension installation button in Exte…
jmcouffin Feb 15, 2026
0a12127
Update custom extension installation path handling in ExtensionsWindo…
jmcouffin Feb 15, 2026
59803ac
Add installation path selection feature in ExtensionsWindow, includin…
jmcouffin Feb 15, 2026
b3579ef
Remove private repository settings from ExtensionsWindow, including U…
jmcouffin Feb 15, 2026
c51d316
Refactor extension installation logic to replace username and passwor…
jmcouffin Feb 15, 2026
1d17a6d
Add localization support for custom extension installation in Extensi…
jmcouffin Feb 15, 2026
42e7b78
Add 'Install Path' label and update group header for custom extension…
jmcouffin Feb 15, 2026
f99b456
Clean up whitespace in ExtensionParser.cs and enhance comments for cl…
jmcouffin Feb 15, 2026
ec2eb76
Add function to derive repository name from Git URL and refactor Exte…
jmcouffin Feb 15, 2026
e47d63d
Enhance extension state checking by allowing retrieval of package fro…
jmcouffin Feb 15, 2026
da1a112
Implement enhancements in ExtensionPackage for improved configuration…
jmcouffin Feb 15, 2026
8addaf5
Refactor WPFWindow resource handling to support deferred merging of r…
jmcouffin Feb 15, 2026
97458e5
chore: update binaries
jmcouffin Feb 15, 2026
5e77bcc
fix: ensure proper removal of extension package configuration by movi…
jmcouffin Feb 15, 2026
3defecc
feat: enhance ExtensionsWindow to update action buttons based on sele…
jmcouffin Feb 15, 2026
2392b2c
fix: ensure consistent error handling in remove function by maintaini…
jmcouffin Feb 15, 2026
2694fc5
feat: add 'Deselect' button functionality in ExtensionsWindow and loc…
jmcouffin Feb 15, 2026
65a47ee
move elements_bounding_box to new lib command
Wurschdhaud Feb 15, 2026
87dbfef
fix saving to config, lazy support for updates
Wurschdhaud Feb 15, 2026
2d29881
Merge pull request #3096 from Wurschdhaud/fix-3016
jmcouffin Feb 15, 2026
07f589c
Merge remote-tracking branch 'upstream/develop' into develop-loader
romangolev Feb 15, 2026
0191260
fix: restore bundle metadata dallback and add ComboBox API aliases
romangolev Feb 15, 2026
4cf675c
fix: copilot suggested impovements
romangolev Feb 16, 2026
3799cf4
chore: update dlls
romangolev Feb 16, 2026
a8df444
Merge pull request #3098 from romangolev/develop-loader
jmcouffin Feb 16, 2026
caffb27
Merge pull request #3094 from Wurschdhaud/fix-#3042
jmcouffin Feb 16, 2026
2a39025
Merge pull request #3095 from Wurschdhaud/enhancement-sb-temp
jmcouffin Feb 16, 2026
28e63d1
change wpf.ResourceReferenceKeyNotFoundException to System.Windows.XXX
Wurschdhaud Feb 16, 2026
d98ed75
fix missing support for default ask_for_date, fix error for non us dates
Wurschdhaud Feb 16, 2026
09351e8
remove double import of System
Wurschdhaud Feb 16, 2026
e775eb8
Merge pull request #3103 from Wurschdhaud/fix3102
jmcouffin Feb 16, 2026
95d6a5f
Merge pull request #3100 from Wurschdhaud/fix-3067
jmcouffin Feb 16, 2026
fed35ba
fix; linting
jmcouffin Feb 16, 2026
1b1256b
last commits to forms module
jmcouffin Feb 16, 2026
88f9f2c
fix: remove unnecessary UTF-8 encoding comment from WPF forms module
jmcouffin Feb 16, 2026
ea4f45e
Merge branch 'develop' into refactor/forms-facade-pr1
jmcouffin Feb 16, 2026
2fdc5d6
Merge pull request #3039 from OriAshkenazi/refactor/forms-facade-pr1
jmcouffin Feb 16, 2026
bea80d9
chore: update binaries
jmcouffin Feb 16, 2026
60aca90
chore: update binaries and bump go mongo driver version to 2.5
jmcouffin Feb 16, 2026
014ecd9
chore: remove unused Dynamo scripts for BIM1_ArrowHeadSwitcher and BI…
jmcouffin Feb 16, 2026
302a7cf
Merge pull request #3104 from pyrevitlabs/new-dynamo-sample-(2026à
jmcouffin Feb 16, 2026
454d432
Next Version
jmcouffin Feb 16, 2026
6f1ea3f
chore: bump version to 6.1.0.26047 across all relevant files
jmcouffin Feb 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
158 changes: 158 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
# CLAUDE.md

This file provides guidance for AI assistants working with the pyRevit codebase.

## Project Overview

pyRevit is a Rapid Application Development (RAD) environment for Autodesk Revit. It allows users to create automation tools and add-ins using Python (IronPython 2.7.12 default, CPython 3.12.3, or IronPython 3.4.0), C#, or VB.NET. The project includes a CLI utility for deployment and a telemetry server for usage tracking.

## Repository Structure

- `bin/` - Pre-built binaries (DLLs) and Python engines (IPY2712PR, IPY342, CPY3123)
- `dev/` - C# source code, build scripts, and solution files
- `docs/` - Documentation source for the website (mkdocs)
- `extensions/` - pyRevit extensions (tools visible in Revit ribbon)
- `extras/` - Additional resources (icons, dark mode generator)
- `licenses/` - Third-party library licenses
- `pyrevitlib/` - Python libraries for Revit API development
- `release/` - Build artifacts and installer configurations
- `site-packages/` - Third-party Python packages (must be IronPython 2.7.12 compatible)

## Languages and Technologies

- **Python**: IronPython 2.7.12 (default), CPython 3.12.3, IronPython 3.4.0
- **C#**: .NET Framework 4.8 (Revit 2017-2024), .NET 8.0 (Revit 2025+)
- **Go**: Telemetry server (`dev/pyRevitTelemetryServer/`)
- **Build Tools**: Visual Studio 2022, pipenv, MSBuild, Inno Setup

## Build Commands

All build commands use pipenv. Run from the repository root:

```bash
# Setup environment
pipenv install
pipenv run pyrevit check # Verify build environment

# Build commands
pipenv run pyrevit build products # Build all C# DLLs (Release mode)
pipenv run pyrevit build products Debug # Build in Debug mode
pipenv run pyrevit build labs # Build main project only
pipenv run pyrevit build engines # Build Python engines
pipenv run pyrevit build installers # Create Inno Setup installers
pipenv run pyrevit build telem # Build telemetry server

# Cleaning
pipenv run pyrevit clean labs # Clean build artifacts

# Version management
pipenv run pyrevit set version <ver> # Set version number
pipenv run pyrevit set build wip # Set as work-in-progress
pipenv run pyrevit set build release # Set as release build
```

## Documentation

- Main website: https://pyrevitlabs.io/
- Technical docs: https://docs.pyrevitlabs.io/ (mkdocs, built from `docs/` folder)

```bash
pipenv run docs # Build documentation (mkdocs)
pipenv run check-docstrings # Lint docstrings with ruff
```

## Testing

```bash
# Test telemetry server (requires Docker)
pipenv run pyrevit test telem

# Python unit tests are in pyrevitlib/pyrevit/unittests/
# C# unit tests are in dev/pyRevitLabs/pyRevitLabs.UnitTests/
```

To test in Revit:
```bash
pyrevit clones add dev <path-to-repo>
pyrevit attach dev default --installed
```

## Development Workflow

1. Fork and clone the repository
2. Checkout `develop` branch (active development)
3. Initialize submodules: `git submodule update --init --recursive`
4. Install dependencies: `pipenv install`
5. Build: `pipenv run pyrevit build products Debug`
6. Test in Revit by attaching the clone

For debugging C# code:
1. Build in Debug mode
2. Open the appropriate `.sln` file in Visual Studio
3. Attach debugger to `revit.exe` process

## Architecture Overview

### Loading Sequence
1. Revit reads `.addin` manifest from Addins folder
2. Manifest points to `pyRevitLoader.dll` (C#)
3. Loader launches `pyrevitloader.py` in IronPython
4. Python script calls `pyrevit.loader.sessionmgr.load_session()`
5. Extensions are discovered and UI is built

### Key Components
- **pyRevitLoader** (`dev/pyRevitLoader/`): Revit add-in entry point
- **PyRevit.Runtime** (`dev/pyRevitLabs/pyRevitLabs.PyRevit.Runtime/`): Command execution
- **pyrevitlib** (`pyrevitlib/pyrevit/`): Python API for scripts
- **CLI** (`dev/pyRevitLabs/pyRevitLabs.PyRevit/`): Command-line management

### Script Engines
Located in `dev/pyRevitLabs/pyRevitLabs.PyRevit.Runtime/`:
- `IronPythonEngine.cs` - Default Python engine
- `CPythonEngine.cs` - Modern Python (3.12)
- `CLREngine.cs` - C#/VB.NET execution
- `DynamoBIMEngine.cs` - Dynamo graphs
- `GrasshopperEngine.cs` - Grasshopper definitions

## Extension Bundle Structure

Extensions follow this hierarchy:
```
MyExtension.extension/
MyTab.tab/
MyPanel.panel/
MyButton.pushbutton/
bundle.yaml # Button configuration
script.py # Python script
icon.png # Button icon
```

Supported bundle types: pushbutton, smartbutton, pulldown, splitbutton, panelbutton

## Key Configuration Files

- `Pipfile` - Python dependencies (requires Python 3.10)
- `pyRevitfile` - Engine definitions and deployment profiles
- `pyproject.toml` - Ruff linting config (Google docstring convention)
- `mkdocs.yml` - Documentation generation
- `.gitmodules` - Git submodules for dependencies

## Code Style

- Python: Google docstring convention, formatted with black, linted with ruff
- C#: Standard .NET conventions

## Supported Revit Versions

2017-2027, with separate builds per version:
- Revit 2017-2024: .NET Framework 4.7.2/4.8
- Revit 2025-2026: .NET 8.0
- Revit 202ù: .NET 10.0

## Git Workflow

- `develop` branch: Active development (always start here)
- `master` branch: Release material only
- `docs` branch: Documentation website
- Feature branches from `develop`, PRs back to `develop`
- Run `git submodule update` after switching branches
Binary file modified bin/netcore/engines/IPY2712PR/pyRevitAssemblyBuilder.dll
Binary file not shown.
Binary file modified bin/netcore/engines/IPY2712PR/pyRevitExtensionParser.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified bin/netcore/engines/IPY2712PR/pyRevitLoader.dll
Binary file not shown.
Binary file modified bin/netcore/engines/IPY2712PR/pyRevitRunner.dll
Binary file not shown.
Binary file modified bin/netcore/engines/IPY342/pyRevitAssemblyBuilder.dll
Binary file not shown.
Binary file modified bin/netcore/engines/IPY342/pyRevitExtensionParser.dll
Binary file not shown.
Binary file modified bin/netcore/engines/IPY342/pyRevitLabs.PyRevit.Runtime.2025.dll
Binary file not shown.
Binary file modified bin/netcore/engines/IPY342/pyRevitLabs.PyRevit.Runtime.2026.dll
Binary file not shown.
Binary file modified bin/netcore/engines/IPY342/pyRevitLabs.PyRevit.Runtime.2027.dll
Binary file not shown.
Binary file modified bin/netcore/engines/IPY342/pyRevitLoader.dll
Binary file not shown.
Binary file modified bin/netcore/engines/IPY342/pyRevitRunner.dll
Binary file not shown.
Binary file modified bin/netcore/pyRevitLabs.Common.dll
Binary file not shown.
Binary file modified bin/netcore/pyRevitLabs.CommonCLI.dll
Binary file not shown.
Binary file modified bin/netcore/pyRevitLabs.CommonWPF.dll
Binary file not shown.
Binary file modified bin/netcore/pyRevitLabs.DeffrelDB.dll
Binary file not shown.
Binary file modified bin/netcore/pyRevitLabs.Emojis.dll
Binary file not shown.
Binary file modified bin/netcore/pyRevitLabs.Language.dll
Binary file not shown.
Binary file modified bin/netcore/pyRevitLabs.PyRevit.Runtime.Shared.dll
Binary file not shown.
Binary file modified bin/netcore/pyRevitLabs.PyRevit.dll
Binary file not shown.
Binary file modified bin/netcore/pyRevitLabs.TargetApps.AutoCAD.dll
Binary file not shown.
Binary file modified bin/netcore/pyRevitLabs.TargetApps.Navisworks.dll
Binary file not shown.
Binary file modified bin/netcore/pyRevitLabs.TargetApps.Revit.dll
Binary file not shown.
Binary file modified bin/netcore/pyRevitLabs.UnitTests.dll
Binary file not shown.
Binary file modified bin/netfx/engines/IPY2712PR/pyRevitAssemblyBuilder.dll
Binary file not shown.
Binary file modified bin/netfx/engines/IPY2712PR/pyRevitExtensionParser.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified bin/netfx/engines/IPY2712PR/pyRevitLoader.dll
Binary file not shown.
Binary file modified bin/netfx/engines/IPY2712PR/pyRevitRunner.dll
Binary file not shown.
Binary file modified bin/netfx/engines/IPY342/pyRevitAssemblyBuilder.dll
Binary file not shown.
Binary file modified bin/netfx/engines/IPY342/pyRevitExtensionParser.dll
Binary file not shown.
Binary file modified bin/netfx/engines/IPY342/pyRevitLabs.PyRevit.Runtime.2017.dll
Binary file not shown.
Binary file modified bin/netfx/engines/IPY342/pyRevitLabs.PyRevit.Runtime.2018.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified bin/netfx/engines/IPY342/pyRevitLabs.PyRevit.Runtime.2021.dll
Binary file not shown.
Binary file modified bin/netfx/engines/IPY342/pyRevitLabs.PyRevit.Runtime.2022.dll
Binary file not shown.
Binary file modified bin/netfx/engines/IPY342/pyRevitLabs.PyRevit.Runtime.2023.dll
Binary file not shown.
Binary file modified bin/netfx/engines/IPY342/pyRevitLabs.PyRevit.Runtime.2024.dll
Binary file not shown.
Binary file modified bin/netfx/engines/IPY342/pyRevitLoader.dll
Binary file not shown.
Binary file modified bin/netfx/engines/IPY342/pyRevitRunner.dll
Binary file not shown.
Binary file modified bin/netfx/pyRevitLabs.Common.dll
Binary file not shown.
Binary file modified bin/netfx/pyRevitLabs.CommonCLI.dll
Binary file not shown.
Binary file modified bin/netfx/pyRevitLabs.CommonWPF.dll
Binary file not shown.
Binary file modified bin/netfx/pyRevitLabs.DeffrelDB.dll
Binary file not shown.
Binary file modified bin/netfx/pyRevitLabs.Emojis.dll
Binary file not shown.
Binary file modified bin/netfx/pyRevitLabs.Language.dll
Binary file not shown.
Binary file modified bin/netfx/pyRevitLabs.PyRevit.Runtime.Shared.dll
Binary file not shown.
Binary file modified bin/netfx/pyRevitLabs.PyRevit.dll
Binary file not shown.
Binary file modified bin/netfx/pyRevitLabs.TargetApps.AutoCAD.dll
Binary file not shown.
Binary file modified bin/netfx/pyRevitLabs.TargetApps.Navisworks.dll
Binary file not shown.
Binary file modified bin/netfx/pyRevitLabs.TargetApps.Revit.dll
Binary file not shown.
Binary file modified bin/netfx/pyRevitLabs.UnitTests.dll
Binary file not shown.
Binary file modified bin/pyRevitLabs.Common.dll
Binary file not shown.
Binary file modified bin/pyRevitLabs.CommonCLI.dll
Binary file not shown.
Binary file modified bin/pyRevitLabs.CommonWPF.dll
Binary file not shown.
Binary file modified bin/pyRevitLabs.Language.dll
Binary file not shown.
Binary file modified bin/pyRevitLabs.PyRevit.dll
Binary file not shown.
Binary file modified bin/pyRevitLabs.TargetApps.Revit.dll
Binary file not shown.
Binary file modified bin/pyrevit-autocomplete.exe
Binary file not shown.
Binary file modified bin/pyrevit-doctor.dll
Binary file not shown.
Binary file modified bin/pyrevit-doctor.exe
Binary file not shown.
Binary file modified bin/pyrevit.dll
Binary file not shown.
Binary file modified bin/pyrevit.exe
Binary file not shown.
1 change: 1 addition & 0 deletions bin/pyrevit.runtimeconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
}
],
"configProperties": {
"System.Reflection.Metadata.MetadataUpdater.IsSupported": false,
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false,
"CSWINRT_USE_WINDOWS_UI_XAML_PROJECTIONS": false
}
Expand Down
2 changes: 1 addition & 1 deletion dev/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</PropertyGroup>

<PropertyGroup>
<Version>6.0.0.26032+2040</Version>
<Version>6.1.0.26047+2349</Version>
<Copyright>Copyright © 2014-2025</Copyright>
<Company>pyRevitLabs.io</Company>
</PropertyGroup>
Expand Down
16 changes: 14 additions & 2 deletions dev/pyRevitLabs.PyRevit.Runtime/scriptruntime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -232,12 +232,24 @@ public ScriptEngineType EngineType {
if (string.IsNullOrEmpty(engineTypeName))
return null;

// Only honor Python engine overrides for Python scripts
if (!PyRevitScript.IsType(ScriptSourceFile, PyRevitScriptTypes.Python))
return null;

// Map string to ScriptEngineType enum
if (engineTypeName.Equals("CPython", StringComparison.OrdinalIgnoreCase))
if (engineTypeName.Equals("CPython", StringComparison.OrdinalIgnoreCase))
return ScriptEngineType.CPython;

if (engineTypeName.Equals("IronPython", StringComparison.OrdinalIgnoreCase))
if (engineTypeName.Equals("IronPython", StringComparison.OrdinalIgnoreCase)) {
// Backward-compat: older command generators always injected
// "type":"IronPython" even when user did not explicitly set it.
// In that case, allow runtime shebang detection to pick engine.
var typeExplicit = json["type_explicit"]?.Value<bool?>() ?? false;
if (!typeExplicit)
return null;

return ScriptEngineType.IronPython;
}

return null;
}
Expand Down
Loading
Loading