PyRevit and Revit 2022 w/ Dynamo

PyRevit and Revit 2022 w/ Dynamo

EATREVITPOOPCAD
Collaborator Collaborator
15,058 Views
3 Replies
Message 1 of 4

PyRevit and Revit 2022 w/ Dynamo

EATREVITPOOPCAD
Collaborator
Collaborator

I believe I saw somewhere that IronPython will not be supported with Revit 2022 and/or the dynamo version it will come with... Some of my plugins use IronPython, which isn't a big deal, I can convert them to whatever the "New python" Dynamo will use... But what about... let's say PyRevit? I know it runs on IronPython. Does that mean it will not work? or can you still install an older version of Dynamo in Revit 2022 that will support IronPython?

The definition of insanity is doing the same thing over and over again and expecting different results
0 Likes
Accepted solutions (1)
15,059 Views
3 Replies
Replies (3)
Message 2 of 4

jeremy_tammik
Alumni
Alumni
Accepted solution

The Revit API is based on .NET. Therefore, everything and anything that supports .NET can be used to work with the Revit API. IronPython is designed to enable usage of Python with .NET. I see no reason why it should stop working. What gave you that idea?

 

That said, you might also try to discuss pyRevit related issues directly with its creator Ehsan in the pyRevit repository via the appropriate channels:

 

https://github.com/eirannejad/pyRevit#staying-updated

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
Message 3 of 4

EATREVITPOOPCAD
Collaborator
Collaborator

Thanks for clearing that up Jeremy. I am still wrapping my head around Revit API & .NET so I get a foggy brain sometimes.

 

I saw this on a webinar and misunderstood it (I only used IronPython inside Dynamo). Basically, the new Dynamo is transitioning from IronPython to CPython. Revit 2021 came with Dynamo and IronPython by default. Revit 2022 comes with Dynamo that has IronPython and CPython, and recommends using CPython. I am assuming in the future it will drop IronPython.

 

This won't affect pyRevit the way I thought it would, Dynamo and pyRevit are independent of each other.

 

https://www.caddmicrosystems.com/blog/top-5-new-features-for-dynamo-for-revit-2022/

 

Here is a paste from article above:

 

One of the biggest things the Dynamo Core team has been working on is the transition from ironpython which limits python to version to 2.7 to Cpython which allows the use of python 3 syntax. This is HUGE for using python to access addition elements in the Revit API, as well as to handle more complex logic scenarios. As of the initial launch of Revit 2022, both ironpython and Cpython are installed as python engines and the engine used can vary within a single dynamo script (although that is not advised). Ironpython remains the default python engine, but can be changed in the settings. To help with the transition, there is a transition tool that will help migrate your python script from ironpython to Cpython.

The definition of insanity is doing the same thing over and over again and expecting different results
0 Likes
Message 4 of 4

jeremy_tammik
Alumni
Alumni

Thank you for your appreciation and the very interesting background information. I was completely unaware of all of it.

  

I use (normal, standalone) Python myself for command line scripts and am still in a very slow and much overdue transitioning process from 2.7 to 3+...

   

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open