# Transaction

**URL:** <https://forum.dynamobim.com/t/transaction/96011>\
**Category:** Revit\
**Tags:** dynamo, transaction\
**Created:** [December 1, 2023, 3:36pm UTC](https://forum.dynamobim.com/t/transaction/96011 "2023-12-01T15:36:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kboschJGDNZ](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kboschjgdnz/32/50308_2.png) [@kboschJGDNZ](https://forum.dynamobim.com/u/kboschJGDNZ)\
**Post date:** [December 1, 2023, 3:36pm UTC](https://forum.dynamobim.com/t/transaction/96011/1 "2023-12-01T15:36:53Z")

</div>

I want to understand the proces of transactions and I want to depend as little as possible on packages and therefore want to replace the passthrough node with transaction start and end.

How should I alter this:

 ![trans](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/6/a64e34b09396d384b1c3fd5f01a8b91e2b90704d.png)

Thanks

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [December 1, 2023, 4:01pm UTC](https://forum.dynamobim.com/t/transaction/96011/2 "2023-12-01T16:01:11Z")

</div>

Transactions and Passthroughs aren’t always interchangeable.

Dynamo executes all its logic “at once” and then passes that on to Revit as a single transaction by default. A passthrough node is just a simple logic gate that ensures that two inputs exist before passing one of them on to a new argument - effectively forcing one part of a graph to finish running before another part starts. That result is still sent to Revit as single transaction.

A transaction is just a single “operation” in Revit. In your case, your Dynamo logic creates a new project parameter and then assigns a value to that parameter. The problem is that the parameter won’t actually exist in Revit until the transaction completes and therefore you wouldn’t be able to write a value to it in the same transaction. You would need one transaction to add the parameter to Revit and a second one to modify the value.

So in your case, you actually need both a transaction _and_ a passthrough. The transaction would come directly before or after the passthrough to ensure that the parameter is created _and_ present in the model before writing to it.

Additionally: You can very easily create your own passthrough node with a code block. In fact, if you edit the custom node you’re using I bet it’s just an embedded code block itself.

---

<div class="post-metadata">

**Author:** ![kboschJGDNZ](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kboschjgdnz/32/50308_2.png) [@kboschJGDNZ](https://forum.dynamobim.com/u/kboschJGDNZ)\
**Post date:** [December 1, 2023, 4:38pm UTC](https://forum.dynamobim.com/t/transaction/96011/3 "2023-12-01T16:38:06Z")

</div>

Great!..I’ve changed the passthrough node with a code block and it seams to be working.

 ![pass](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/8/28257ce2514da452c5b47aa034ae89bac2740abf.png)  
The transaction part is still a bit confusing as I’ve only added the transaction.end node and the code is working fine without the transaction.start node.

In fact… I don’t need the transaction nodes at all, as everything seems to work fine without them.

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [December 1, 2023, 4:43pm UTC](https://forum.dynamobim.com/t/transaction/96011/4 "2023-12-01T16:43:04Z")

</div>

You typically don’t need both transaction nodes as there’s always one running. So either node will end the current transaction and start a new one.

> [@kboschJGDNZ](#):
>
> I don’t need the transaction nodes at all, as everything seems to work fine without them.

The `CreateProjectParameter` node may have an internal transaction. Or, if you’ve ran this graph multiple times already, the parameter may already exist.
