From b3a82024443897d196f95601a6f1ee5f1dc5c0f4 Mon Sep 17 00:00:00 2001 From: Jean-Marc Couffin Date: Thu, 3 Apr 2025 17:56:21 +0200 Subject: [PATCH 1/4] Revit 2026 Support --- .../PythonConsoleControl.xaml | 2 +- .../PythonConsoleControl.xaml.cs | 16 ++++++++-------- RevitPythonShell.sln | 17 +++++++++++++++++ RevitPythonShell/RevitPythonShell.csproj | 19 +++++++++++++++++-- RpsRuntime/RpsRuntime.csproj | 16 ++++++++++++++-- build/Build.csproj.DotSettings | 5 ++++- 6 files changed, 61 insertions(+), 14 deletions(-) diff --git a/PythonConsoleControl/PythonConsoleControl.xaml b/PythonConsoleControl/PythonConsoleControl.xaml index 2e41cb4..6ee6379 100644 --- a/PythonConsoleControl/PythonConsoleControl.xaml +++ b/PythonConsoleControl/PythonConsoleControl.xaml @@ -8,6 +8,6 @@ - + diff --git a/PythonConsoleControl/PythonConsoleControl.xaml.cs b/PythonConsoleControl/PythonConsoleControl.xaml.cs index 6615483..a437aa2 100644 --- a/PythonConsoleControl/PythonConsoleControl.xaml.cs +++ b/PythonConsoleControl/PythonConsoleControl.xaml.cs @@ -14,21 +14,21 @@ namespace PythonConsoleControl /// public partial class IronPythonConsoleControl : UserControl { - PythonConsolePad pad; + PythonConsolePad _pad; /// /// Perform the action on an already instantiated PythonConsoleHost. /// public void WithConsoleHost(Action action) { - pad.Host.WhenConsoleCreated(action); + _pad.Host.WhenConsoleCreated(action); } public IronPythonConsoleControl() { InitializeComponent(); - pad = new PythonConsolePad(); - grid.Children.Add(pad.Control); + _pad = new PythonConsolePad(); + Grid.Children.Add(_pad.Control); // Load our custom highlighting definition IHighlightingDefinition pythonHighlighting; using (Stream s = typeof(IronPythonConsoleControl).Assembly.GetManifestResourceStream("PythonConsoleControl.Resources.Python.xshd")) @@ -43,17 +43,17 @@ public IronPythonConsoleControl() } // and register it in the HighlightingManager HighlightingManager.Instance.RegisterHighlighting("Python Highlighting", new string[] { ".cool" }, pythonHighlighting); - pad.Control.SyntaxHighlighting = pythonHighlighting; - IList transformers = pad.Control.TextArea.TextView.LineTransformers; + _pad.Control.SyntaxHighlighting = pythonHighlighting; + IList transformers = _pad.Control.TextArea.TextView.LineTransformers; for (int i = 0; i < transformers.Count; ++i) { - if (transformers[i] is HighlightingColorizer) transformers[i] = new PythonConsoleHighlightingColorizer(pythonHighlighting, pad.Control.Document); + if (transformers[i] is HighlightingColorizer) transformers[i] = new PythonConsoleHighlightingColorizer(pythonHighlighting, _pad.Control.Document); } } public PythonConsolePad Pad { - get { return pad; } + get { return _pad; } } } } diff --git a/RevitPythonShell.sln b/RevitPythonShell.sln index b6b3d53..9490045 100644 --- a/RevitPythonShell.sln +++ b/RevitPythonShell.sln @@ -40,6 +40,8 @@ Global Release R23|Any CPU = Release R23|Any CPU Release R24|Any CPU = Release R24|Any CPU Release R25|Any CPU = Release R25|Any CPU + Release R26|Any CPU = Release R26|Any CPU + Debug R26|Any CPU = Debug R26|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {7E37F14E-D840-42F8-8CA6-90FFC5497972}.Debug R22|Any CPU.ActiveCfg = Debug R22|Any CPU @@ -69,6 +71,9 @@ Global {7E37F14E-D840-42F8-8CA6-90FFC5497972}.Release R24|Any CPU.Build.0 = Release R24|Any CPU {7E37F14E-D840-42F8-8CA6-90FFC5497972}.Release R25|Any CPU.ActiveCfg = Release R25|Any CPU {7E37F14E-D840-42F8-8CA6-90FFC5497972}.Release R25|Any CPU.Build.0 = Release R25|Any CPU + {7E37F14E-D840-42F8-8CA6-90FFC5497972}.Release R26|Any CPU.ActiveCfg = Release R26|Any CPU + {7E37F14E-D840-42F8-8CA6-90FFC5497972}.Release R26|Any CPU.Build.0 = Release R26|Any CPU + {7E37F14E-D840-42F8-8CA6-90FFC5497972}.Debug R26|Any CPU.ActiveCfg = Debug R26|Any CPU {F1152D68-346B-4F48-8DB7-BE67B5CB1F49}.Debug R22|Any CPU.ActiveCfg = Debug|Any CPU {F1152D68-346B-4F48-8DB7-BE67B5CB1F49}.Debug R22|Any CPU.Build.0 = Debug|Any CPU {F1152D68-346B-4F48-8DB7-BE67B5CB1F49}.Debug R23|Any CPU.ActiveCfg = Debug|Any CPU @@ -77,6 +82,8 @@ Global {F1152D68-346B-4F48-8DB7-BE67B5CB1F49}.Debug R24|Any CPU.Build.0 = Debug|Any CPU {F1152D68-346B-4F48-8DB7-BE67B5CB1F49}.Debug R25|Any CPU.ActiveCfg = Debug|Any CPU {F1152D68-346B-4F48-8DB7-BE67B5CB1F49}.Debug R25|Any CPU.Build.0 = Debug|Any CPU + {F1152D68-346B-4F48-8DB7-BE67B5CB1F49}.Debug R26|Any CPU.ActiveCfg = Debug|Any CPU + {F1152D68-346B-4F48-8DB7-BE67B5CB1F49}.Debug R26|Any CPU.Build.0 = Debug|Any CPU {F1152D68-346B-4F48-8DB7-BE67B5CB1F49}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F1152D68-346B-4F48-8DB7-BE67B5CB1F49}.Debug|Any CPU.Build.0 = Debug|Any CPU {F1152D68-346B-4F48-8DB7-BE67B5CB1F49}.Installer|Any CPU.ActiveCfg = Release|Any CPU @@ -96,6 +103,8 @@ Global {F1152D68-346B-4F48-8DB7-BE67B5CB1F49}.Release R24|Any CPU.Build.0 = Release|Any CPU {F1152D68-346B-4F48-8DB7-BE67B5CB1F49}.Release R25|Any CPU.ActiveCfg = Release|Any CPU {F1152D68-346B-4F48-8DB7-BE67B5CB1F49}.Release R25|Any CPU.Build.0 = Release|Any CPU + {F1152D68-346B-4F48-8DB7-BE67B5CB1F49}.Release R26|Any CPU.ActiveCfg = Release|Any CPU + {F1152D68-346B-4F48-8DB7-BE67B5CB1F49}.Release R26|Any CPU.Build.0 = Release|Any CPU {C8446636-C663-409F-82D0-72C0D55BBA1C}.Debug R22|Any CPU.ActiveCfg = Debug R22|Any CPU {C8446636-C663-409F-82D0-72C0D55BBA1C}.Debug R22|Any CPU.Build.0 = Debug R22|Any CPU {C8446636-C663-409F-82D0-72C0D55BBA1C}.Debug R23|Any CPU.ActiveCfg = Debug R23|Any CPU @@ -104,6 +113,8 @@ Global {C8446636-C663-409F-82D0-72C0D55BBA1C}.Debug R24|Any CPU.Build.0 = Debug R24|Any CPU {C8446636-C663-409F-82D0-72C0D55BBA1C}.Debug R25|Any CPU.ActiveCfg = Debug R25|Any CPU {C8446636-C663-409F-82D0-72C0D55BBA1C}.Debug R25|Any CPU.Build.0 = Debug R25|Any CPU + {C8446636-C663-409F-82D0-72C0D55BBA1C}.Debug R26|Any CPU.ActiveCfg = Debug R26|Any CPU + {C8446636-C663-409F-82D0-72C0D55BBA1C}.Debug R26|Any CPU.Build.0 = Debug R26|Any CPU {C8446636-C663-409F-82D0-72C0D55BBA1C}.Debug|Any CPU.ActiveCfg = Debug R22|Any CPU {C8446636-C663-409F-82D0-72C0D55BBA1C}.Debug|Any CPU.Build.0 = Debug R22|Any CPU {C8446636-C663-409F-82D0-72C0D55BBA1C}.Installer|Any CPU.ActiveCfg = Release R23|Any CPU @@ -123,10 +134,13 @@ Global {C8446636-C663-409F-82D0-72C0D55BBA1C}.Release R24|Any CPU.Build.0 = Release R24|Any CPU {C8446636-C663-409F-82D0-72C0D55BBA1C}.Release R25|Any CPU.ActiveCfg = Release R25|Any CPU {C8446636-C663-409F-82D0-72C0D55BBA1C}.Release R25|Any CPU.Build.0 = Release R25|Any CPU + {C8446636-C663-409F-82D0-72C0D55BBA1C}.Release R26|Any CPU.ActiveCfg = Release R26|Any CPU + {C8446636-C663-409F-82D0-72C0D55BBA1C}.Release R26|Any CPU.Build.0 = Release R26|Any CPU {B0FECFED-4451-4C7D-ACB7-59CC6F12FBAF}.Debug R22|Any CPU.ActiveCfg = Debug|Any CPU {B0FECFED-4451-4C7D-ACB7-59CC6F12FBAF}.Debug R23|Any CPU.ActiveCfg = Debug|Any CPU {B0FECFED-4451-4C7D-ACB7-59CC6F12FBAF}.Debug R24|Any CPU.ActiveCfg = Debug|Any CPU {B0FECFED-4451-4C7D-ACB7-59CC6F12FBAF}.Debug R25|Any CPU.ActiveCfg = Debug|Any CPU + {B0FECFED-4451-4C7D-ACB7-59CC6F12FBAF}.Debug R26|Any CPU.ActiveCfg = Debug|Any CPU {B0FECFED-4451-4C7D-ACB7-59CC6F12FBAF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B0FECFED-4451-4C7D-ACB7-59CC6F12FBAF}.Debug|Any CPU.Build.0 = Debug|Any CPU {B0FECFED-4451-4C7D-ACB7-59CC6F12FBAF}.Installer|Any CPU.ActiveCfg = Release|Any CPU @@ -139,10 +153,12 @@ Global {B0FECFED-4451-4C7D-ACB7-59CC6F12FBAF}.Release R23|Any CPU.ActiveCfg = Release|Any CPU {B0FECFED-4451-4C7D-ACB7-59CC6F12FBAF}.Release R24|Any CPU.ActiveCfg = Release|Any CPU {B0FECFED-4451-4C7D-ACB7-59CC6F12FBAF}.Release R25|Any CPU.ActiveCfg = Release|Any CPU + {B0FECFED-4451-4C7D-ACB7-59CC6F12FBAF}.Release R26|Any CPU.ActiveCfg = Release|Any CPU {0DF5F952-C36B-4C97-B0CD-678C61093311}.Debug R22|Any CPU.ActiveCfg = Debug|Any CPU {0DF5F952-C36B-4C97-B0CD-678C61093311}.Debug R23|Any CPU.ActiveCfg = Debug|Any CPU {0DF5F952-C36B-4C97-B0CD-678C61093311}.Debug R24|Any CPU.ActiveCfg = Debug|Any CPU {0DF5F952-C36B-4C97-B0CD-678C61093311}.Debug R25|Any CPU.ActiveCfg = Debug|Any CPU + {0DF5F952-C36B-4C97-B0CD-678C61093311}.Debug R26|Any CPU.ActiveCfg = Debug|Any CPU {0DF5F952-C36B-4C97-B0CD-678C61093311}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0DF5F952-C36B-4C97-B0CD-678C61093311}.Debug|Any CPU.Build.0 = Debug|Any CPU {0DF5F952-C36B-4C97-B0CD-678C61093311}.Installer|Any CPU.ActiveCfg = Release|Any CPU @@ -154,6 +170,7 @@ Global {0DF5F952-C36B-4C97-B0CD-678C61093311}.Release R23|Any CPU.ActiveCfg = Release|Any CPU {0DF5F952-C36B-4C97-B0CD-678C61093311}.Release R24|Any CPU.ActiveCfg = Release|Any CPU {0DF5F952-C36B-4C97-B0CD-678C61093311}.Release R25|Any CPU.ActiveCfg = Release R25|Any CPU + {0DF5F952-C36B-4C97-B0CD-678C61093311}.Release R26|Any CPU.ActiveCfg = Release R26|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/RevitPythonShell/RevitPythonShell.csproj b/RevitPythonShell/RevitPythonShell.csproj index 51c1868..621634b 100644 --- a/RevitPythonShell/RevitPythonShell.csproj +++ b/RevitPythonShell/RevitPythonShell.csproj @@ -11,8 +11,8 @@ Revit Python Shell addin for Revit false Program - Debug R22;Debug R23;Debug R24;Debug R25 - $(Configurations);Release R18;Release R19;Release R20;Release R21;Release R22;Release R23;Release R24;Release R25 + Debug R22;Debug R23;Debug R24;Debug R25;Debug R26 + $(Configurations);Release R18;Release R19;Release R20;Release R21;Release R22;Release R23;Release R24;Release R25;Release R26 @@ -84,6 +84,15 @@ true true + + + 2026 + net8.0-windows + $(DefineConstants);R26 + $(ProgramW6432)\Autodesk\Revit 2026\Revit.exe + true + true + @@ -239,6 +248,12 @@ + + + + + + $(RevitVersion) diff --git a/RpsRuntime/RpsRuntime.csproj b/RpsRuntime/RpsRuntime.csproj index 7efb67c..d7b4460 100644 --- a/RpsRuntime/RpsRuntime.csproj +++ b/RpsRuntime/RpsRuntime.csproj @@ -5,8 +5,8 @@ false false x64 - Debug R22;Debug R23;Debug R24;Debug R25 - $(Configurations);Release R18;Release R19;Release R20;Release R21;Release R22;Release R23;Release R24;Release R25 + Debug R22;Debug R23;Debug R24;Debug R25;Debug R26 + $(Configurations);Release R18;Release R19;Release R20;Release R21;Release R22;Release R23;Release R24;Release R25;Release R26 true @@ -73,6 +73,12 @@ $(DefineConstants);R25 + + 2026 + net8.0-windows + $(DefineConstants);R26 + + $(RevitVersion) true @@ -196,5 +202,11 @@ + + + + + + diff --git a/build/Build.csproj.DotSettings b/build/Build.csproj.DotSettings index 95fbce8..575d161 100644 --- a/build/Build.csproj.DotSettings +++ b/build/Build.csproj.DotSettings @@ -17,6 +17,8 @@ False <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> + <Policy><Descriptor Staticness="Instance" AccessRightKinds="Private" Description="Instance fields (private)"><ElementKinds><Kind Name="FIELD" /><Kind Name="READONLY_FIELD" /></ElementKinds></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="AaBb" /></Policy> + <Policy><Descriptor Staticness="Static" AccessRightKinds="Private" Description="Static fields (private)"><ElementKinds><Kind Name="FIELD" /></ElementKinds></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="AaBb" /></Policy> True True True @@ -25,4 +27,5 @@ True True True - True + True + True From 5919c61019424211f44641ca0711c9fa23e0a307 Mon Sep 17 00:00:00 2001 From: Jean-Marc Couffin Date: Thu, 3 Apr 2025 18:48:52 +0200 Subject: [PATCH 2/4] Update CHANGELOG.md --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ff9b63..e728e2f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # Changelog -- 2025-03-04 **2.1.0** +- 2025-04-03 **2.2.0** + - Support Autodesk Revit version 2026. +- 2025-04-03 **2.1.0** - Support Autodesk Revit version 2025. - 2023-09-13 **2.0.2** - Improvement user interface and user experience with coding. From 9d5f26782fd99805723610cee32a39750e7cca08 Mon Sep 17 00:00:00 2001 From: Jean-Marc Couffin Date: Thu, 3 Apr 2025 18:52:26 +0200 Subject: [PATCH 3/4] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 46192e9..114ec89 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ Various differences between IronPython and CPython can follow at [Differences Ir ## Installation -Please follow last release at section [Release](https://github.com/architecture-building-systems/revitpythonshell/releases/latest) support version Support From Revit 2018-2025. +Please follow last release at section [Release](https://github.com/architecture-building-systems/revitpythonshell/releases/latest) support version Support From Revit 2018-2026. Older versions: - [Installer for Autodesk Revit 2022](https://github.com/architecture-building-systems/revitpythonshell/releases/download/2021.06.20/2021.06.20_Setup_RevitPythonShell_2022.exe) @@ -119,6 +119,7 @@ This project is licensed under the terms of the [MIT License](http://opensource. * [Nice3Point](https://github.com/Nice3point) for process CI/CD * [Chuong Mep](https://github.com/chuongmep/) a people like maintain for project open source. * [Roman Golev](https://github.com/romangolev/) (port to Revit 2025) +* [Jean-Marc Couffin](https://github.com/jmcouffin/) (port to Revit 2026) * many, many users with questions, bug reports etc! Also, many thanks to the From 904459447d14c50cb9baee7025760c34eaab208e Mon Sep 17 00:00:00 2001 From: Jean-Marc Couffin Date: Thu, 3 Apr 2025 18:54:17 +0200 Subject: [PATCH 4/4] Bump to version 2.2.0 --- Installer/Installer.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Installer/Installer.cs b/Installer/Installer.cs index 043b61e..17e2156 100644 --- a/Installer/Installer.cs +++ b/Installer/Installer.cs @@ -12,7 +12,7 @@ const string projectName = "RevitPythonShell"; const string outputName = "RevitPythonShell"; const string outputDir = "output"; -const string version = "2.1.0"; +const string version = "2.2.0"; var fileName = new StringBuilder().Append(outputName).Append("-").Append(version); var project = new Project @@ -67,4 +67,4 @@ WixEntity[] GenerateWixEntities() } return versionStorages.Select(storage => new Dir(storage.Key, storage.Value.ToArray())).Cast().ToArray(); -} \ No newline at end of file +}