Delete copied elements after script execution

Hello Dynamo community!

Is there a way to define the execution order of operations in Dynamo?
In my skript i want to:

  1. Copy elements from a linked file to the active project
  2. Do stuff with that element geometry
  3. Delete the copied elements from the active project

Points 1 and 2 are successful in my skript, i seem to have problems to delete the elements after all executions are done!

Would be grateful for your support!

Try to use the Transaction.End and Transaction.Start nodes and see if that helps you. Depending on the complexity of the graph and the nodes used you can’t delete an element that isn’t “Committed” to the model yet. Often creating and deleting items in the same run can do this.

It may also help if you share some or all of your graph so we can verify the best way to help you.

Geia sou Vasiliki,

You should use Transaction.End after the first part and then use Passthrough or “Await” connect the Transaction.End as wait for and Passtrough the second part.

If you have problems about it, let me know.

1 Like

Used the “Passthrough” node and worked like a charm, thank you so so much for the good tip!

1 Like