Starting from Revit 2023, the defaut Python engine for Dynamo is CPython3.
If one would like to use IronPython, an additional Dynamo IronPython package needs to be installed:
But what about Revit 2023 Macros? Are they still capable of working with IronPython, without the installation of Dynamo IronPython package?
Hi @george , Macro is difference with Dynamo Revit, so you can use and no need install package from dynamo package manager.
Macro Python Module Revit 2023 : C:\Program Files\Autodesk\Revit 2023\SDA\AddIns\BackendBindings\PythonBinding\IronPython.dll
Dynamo Revit Module : Path of your package installed
Iron Python 2.7 is not supported any longer as Python 2 is not supported or maintained. This means that when (not if) a security exploit is found in Python 2 no one will be patching it, which will mean IronPython 2.7 will have the same vulnerability, which will mean Dynamo would have the same vulnerability, which would mean Revit would have the same vulnerability.
Hence the move to a Python3 tool, CPython. If IronPython gets a stable Python 3.x build together then it may be possible to add IronPython 3x to the list of engines, but for now you should plan on utilizing CPython or taking additional steps to ensure you aren’t left vulnerable to a Python 2.x exploit.
Could you expand on what is meant by “stable Python3.x” version? I saw on what I think is the official IronPython website IronPython GitHub, that IronPython version 3.4 is out. The website says that this is a “stable” version.
Yes, they now have a stable supported version, which means it is actually a possibility to port into Dynamo. At the time of that post this build wasn’t out (I don’t think they even had an Alpha version yet).
This is something the team would like to do, but they don’t have a timeline or any immediate plans. The IronPython 2.7 and CPython engines should suffice for now.
Hello this is Gulshan Negi
Revit macros can be created using the Visual Basic for Applications (VBA) programming language or the .NET Framework and the C# programming language. IronPython is a third-party Python implementation that can be used to create macros for Revit, and the Dynamo IronPython package may be useful for accessing certain Revit functions and features, but it is not required. It is recommended to check the official documentation and forums for the most up-to-date information on using IronPython with Revit macros.
I hope it is clear now.
Thanks