Infinite loop crashing Dynamo

Hi

I have a *dxf file linked into a revit 2018 model (unit meters) and I’m using Dynamo 2.0.3 to extract its curves. But it is crashing in Auto mode. If I use select model element, and run it in Auto mode, it works and it takes about 7 sec to run.

If however, I automatically reference the important instance using a name filter (which returns only one result), it will work in manual mode (about 6 secs processing time) but will crash in Auto mode.

I suspect it is somehow creating an infinite loop but I can’t understand why. I’ve tried using end transaction after retrieving the import instance but if make any difference work. I though it might be a lacing issue or some other problem with the Bimorph nodes but it worked in the first example so not sure why it is failing here.

Any suggestions? @Thomas_Mahon @jacob.small @Michael_Kirschner2

Auto2.dyn (31.3 KB) Select2.dyn (14.2 KB)
CM_Roads.dxf (54.6 KB)

Is this a crash (as in Revit and Dynamo cease to be open), or anlock up (as in Dynamo and Revit spend all day calculating even if left to their own devices for an unreasonable period)?

If you freeze the bimorph node for import instance curves does it still crash (or lock up)? If not it could be a result of the import instances being in a list - try a means of pulling the individual instance out of the list, or set the list level to @L1.

Also, if this is a crash (not a lock up) can you attach a journal from that session, and the Dynamo log? These help us confirm if it’s Revit or Dynamo causing the issue.

@jacob.small It is an anlock. Freezing the bimorph node works in Auto mode. Removing the list structure and feeding it in in Auto mode doesn’t work.

Changing the list level to @1 also doesn’t work.

dynamoLog_3d5e71f6-429e-427c-9463-f3a84294a5c9.txt (76.2 KB)
CM_Street_Names.dxf (70.0 KB)

Manual execution is the simplest solution. This problem was reported a while back - its a Dynamo VM problem which cant be resolved in a ZT node - it seems there’s no solution, not without fundamentally changing the way Dynamo interacts with Revit.

Alternatively if you do need to execute automatically, you could collect your import instances and filter them using a Python node with some custom code with a if statement to control when to refresh/re-run the node as this will prevent Dynamo’s VM from re-executing the node automatically.

1 Like

@Thomas_Mahon

Thanks for that. It was driving me crazy. I was aware that all elements of type created infinite loops but had wrongly assumed that becuase the ElementType.ByName node from Clockwork was using Python this would somehow stop the infinite loop. Using Spring nodes Collect.AllElementsOf solves the problem. Thanks again.

2 Likes