Revit 2019 will not be a supported product very soon (if it isn’t already). The Autodesk support window is Current Version (2023) + 3 years back (2022, 2021, 2020). 2019 is currently in the gray area where you ought to be actively moving those jobs into a newer build. There is no reason to not do this - I haven’t met anyone in my travel who can’t upgrade, just some cranky people who ‘won’t’.
You are right that avoiding packages is causing some added work if not managed well. I’ve got an AU submission heading in today on how to manage that stuff; hopefully that will help change your teams perspective to make things easier for you.
So far, the little switch icon in the python script has worked well for me. The last few that I have shared here have been in Cpython as well. However, there is no “bulk migrate” option that I know of.
I am not too sure about that one. Perhaps @solamour has more info
@leonard.moelders IronPython2 is shipped as a package from Dynamo 2.13 onwards, and there is no expiry date on this package As a user, you can choose to keep using this indefinitely.
Out-of-the-box we are shipping CPython3, because IronLanguages (The team that make IronPython) are no longer releasing security updates to IronPython2, and to date IronPython3 is not yet ready enough for us to integrate. In the future, we’ll look at IronPython3 when it’s ready.
As sol noted the IronPython package lives on with no planned expiration. However it is a security risk to have installed.
Dynamo consumes Iron Python. Iron Python consumes Python 2.7. Python 2.7 is not being maintained, updated, or patched.
So should an exploit needing a security patch come out it won’t follow from the Dynamo team, the IronPython team, or the Python team, and all three would need to do an update in backwards order to resolve. I doubt that the Python team is actively monitoring 2.7 for exploits as it is well retired at this point.
But if you aren’t concerned with the security implications, have at it!
Personally I would drop it as soon as I can; I shudder every time a customer need means I need to put that package in place.
@john_pierson , @solamour and @jacob.small
Thank you guys for your help and deeper insight! I hope my group leader will let us use the 2021 Version soon. Unfortunately she is stubborn regarding this topic. She never wants to use the newest version of any software “bEcaUse tHey aRe noT sTaBle” @jacob.small I would be glad if you could send me a link for that AU submission respectively video
How do I know that a CurrentWorkspace has a .Nodes property? I couldn’t find it in github. I found out how we got to currentWorkspace = […] from this line:
But how do I know that this has the .Nodes Property?
The rest is clear.
You can also use dir(thing) if you want to explore inside of Dynamo too
dir() refers to directory, and you can use anything that exists inside of the Python memory space. For example, dir() will pick up everything that exists, and dir(thing) will explore a thing, while dir(thing.thing) will explore a sub-thing.
The original code was written in IronPython2 which had string.Equals(). You’re writing in CPython3 now which doesn’t have this method. You can just use == instead.