Import clr makes other dynamo nodes not work properly anymore?

In a dynamo script I added a python node with the following code:

import sys
import clr

numbers = IN[0]
text =

for n in numbers:
text. append (str( int( round(n))))

OUT = text

In the dynamo script I also had Element.Geometry node. I found out that the node in some cases wouldn’t work properly anymore because of “import clr” in the python code. Does anyone knows what the cause is and how to solve it, except then to delete that part of the code?

These two nodes are be completely separate. What happens in the Python node has zero influence on what happens in the Dynamo node environment. Any chance your family was modified between runs?

I completely rebuild the script using the same nodes and same python code and now it works fine. I do not understand this. Has anybody idea what is going on?

I added both dynamo scripts as you can see they are exactly the same.

The “bk en ok bepaling V0.8 test case” script I get the following error: Warning: One or more geometries have failed to convert due to this error: Unable to create Line. Points are likely coincident

The “bk en ok bepaling V0.9 test case” I don’t get the error.
bk en ok bepaling V0.9 test case.dyn (25.3 KB)
bk en ok bepaling V0.8 test case.dyn (25.5 KB)

Do you have a simple RVT to reproduce on?

Hereby a simple rvt to reproduce it on

dynamo test case.rvt (692 KB)

1 Like