Dynamo to Revit transaction failing


I tried all day to solve a weird problem but I simply can’t find a solution.
I am trying to create multiple roofs which are shaped by points. The user inputs are ModelCurves as the top of the roof outline and RoofTypes. The script than creates

  • a planar outline at the bottom of the roofs
  • a level at the bottom of the roofs
  • control points for the shape

Afterwards it creates the roofs, changes the shape by the given points and saves the element ID’s as a parameter

The script works as intended until I create a custom node out of it. When I use it as custom node the elements get created as intended (judging by the output values) but they never show up in Revit. Furthermore if I try to select the elements by ID outside of the custom node flow they aren’t found.

Does anybody have an idea how to solve that?


Testing CustomNode:

Expected result created without CustomNode:

CustomNode.dyf (113.7 KB)
Test-CustomNode.dyn (21.8 KB)

A Transaction.End node maybe needed here.
The Roof needs to be created first before you can access their ID.

Thanks for the hint. I tried that. Now I see the elements for a short amount of time after running the script. Afterwards they somehow get deleted again.

Here i need an expert.

Funnily enough I can undo the “deletion” step in Revit and get my roofs.

Did you ever thought about element binding?
Or can you skip that as a possibility?

Thought about that aswell but ElementBinding is disabled both in the CustomNode and in the script. I used the Node from the Rhythm package for that. Tried w/o binding toogled off aswell but didnt’t work either.

I placed the Transaction.End node at the very end of the CustomNode and changed the flow so there are no parallel procedures for the roof elements.

OK. back to the beginning
What does the error say?

I dont’t have an error anymore. At the beginning it was a non valid element ID because the transaction didn’t end.

1 Like

I believe that once you pack it into a custom node binding is reintroduced, no matter how you manage it inside the node.

By the sounds of it you are going to be best served by breaking this into a few custom nodes. One to make the initial shape and one to do the edits.