Attempted to read or write protected memory. This is often an indication that other memory is corrupt

So i created/stitched a script to speed up my workflow which place’s down roofs and floors for every room in my project.
I’m using Revit 2019.1.6 and Dynamo 2.0.3.

5.0 Floor and roof by room v2 wip.dyn (344.2 KB)
The floor part works great, but creating roofs does not. I get this error:

I have also tried switching to this node by Wombat, but it makes the same error:

Any idea? :slight_smile:

this implies a memory issue with the dynamo geometry library somewhere in the graph - it does not necessarily mean it occurs where the error is actually raised though.

Do you have any python in this graph creating geometry?

are you following this advice?

Are you using Links at all? I have seen this error when trying to do certain things in / with linked documents.

1 Like

5.2. Roof by room v2.dyn (21.9 KB)

I have tried using the “standard” nodes that come with dynamo, but the error still occurs…

I’m not using linked documents.
The walls i draw are sometimes Curtain Panel system walls, and sometimes regular walls.
The code does not work on both of them.

there is a bug in this node - thanks for reporting it:

these curves need to be disposed, I will report it to the Revit team.

potential fix:

1 Like

Has this been fixed or if not, and will it be?
I found a way to trick dynamo to place all the roofs, just by placing a random roof somwhere on the model and then running the script.

Thank you! There was the same mistake. This was because Doc and Linkdoc were used in the same transaction. Also changed doc.ActiveView from 3D view to FloorPlan view