Order of execution issue with Revit element generation and modify

Hi everyone,
I’m pretty a beginner with Dynamo + Revit. I’m struggling with an issue and cannot get rid of it.

Besicaly i’m using Dynamo to generate Revit elements and then to modify their properties.
When I try to do it with columns i get a “serious error” message from Revit and get no results (no column generated).
I managed to isolate the part of the code that makes Revit crash, here it is.


2020.10.22_CM - Column debug 02

However, if I freeze the nodes that modify the column, run the script to generate the column and after rerun all unfeezing all the nodes I get the results I want… (column generated in the first run, column modified in the second).
I imagine it’s some sort of issue with the order of execution of the nodes.


The really weird thing:
I have almost the same nodes structure for walls but gess what: no problem at all with walls…

Can you suggest a way to solve this problem?
Thank you very much!

Look into Wait nodes or Transactions. You’ll probably need a Transaction here as Dynamo can’t modify an element until it’s been created and the element doesn’t get created until Dynamo has run.

Thanks Nick_Boyts!
I tried the transaction nodes and they worked perfectly.
They were pretty obscure to me before, now I see how much useful they are!
I just added the red group in the image…