Dynamo + Revit Crash at Simple Script - Why?

Hi, I am in need of some help here.

I have created this simple script called “Views by Order Number”. It consists of 4 steps

  1. get elements of category
  2. sort elements by Order number parameter
  3. group elements by Order number parameter
  4. create a 3D view for each unique Order number parameter value

Its a pretty simple script, using only OOTB nodes. But Revit and Dynamo crash when sending input towards the View.Duplicate node.

Why is this happening? What’s going on?

To let you reproduce it, I have attached the .dyn.
Apparently 3,5 mb is too much to upload for a revit project. So here is a download link.

Views by Order Number.dyn (14.4 KB)

For the screenshot, please zoom in and create a screen capture, currently we can’t tell what’s going on.

1 Like

Sorry… Here’s a better picture


1 Like

This is to illustrate that Order number is a text parameter

Using Revit 2017 and Dynamo 1.2.2

I would try changing the lacing on the View.Duplicate node to longest instead of cross-product

1 Like

Thanks for your reply. I tried that. Still crashes.
Also crashes at shortest lacing.

try running this graph in manual mode ( if not already)

1 Like

Wow! :smiley: That worked. Great, thanks a lot.

Any idea why this would make a difference?

this forms a type of infinite loop where you add items to the document and then query the document for elements. I think 1.3 and up have some mitigation for this.

1 Like

That’s a great explanation. Thanks.