Executing One Branch At A Time

My comment was unrelated to Dynamo.

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.

2 Likes

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

2 Likes

@leonard.moelders IronPython2 is shipped as a package from Dynamo 2.13 onwards, and there is no expiry date on this package :slight_smile: 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.

4 Likes

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.

1 Like

@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” :roll_eyes:
@jacob.small I would be glad if you could send me a link for that AU submission respectively video

1 Like

I have a question here:

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.

I tend to rely on Visual Studio’s intellicode quite a bit (C#).

But you can also explore the API through fuget. DynamoVisualProgramming.Core 2.14.0.4641 - FuGet Gallery

There are also the developer resources here: Extensions · GitBook

3 Likes

You can also use dir(thing) if you want to explore inside of Dynamo too :slight_smile:

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.

7 Likes

Dir is quite useful, but when possible I prefer to use the inspect modules “getmembers” function.

import inspect
inspect.getmembers(thing)

This will give you more documentation and insight into what the results returned by dir(thing) are.

3 Likes

3 posts were split to a new topic: Accessing DynamoCore and DynamoRevit Assemblies and Namespaces in Python

Good morning,

I’m trying to run this Python code, provided by @Nick_Boyts , I get an error message. Can you help me to solve it.
THANKS


P12
test.dyn (11.2 KB)

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.

Thanks for your answer @Nick_Boyts , but it doesn’t work.

Can you show us what you’re actually doing and what’s going wrong?

Yes, thanks.


P13

The code is looking for the node name. You have to rename your nodes to match the names you’re checking against.
image

@Nick_Boyts, Yes it works, thank you very much