IF true? passthrough: Transaction.End

revit
#1

I understand nothing about the Transaction system, but what I’m trying to do is end a branch of my script without returning an error from nodes downstream. I can end a branch with an IF node that returns null, but I’m wondering if there’s a way to end a branch with an IF node that uses Transaction.End?

0 Likes

#2

The Transaction nodes are to have Revit start or stop something at a particular point.

Transaction.End is basically telling Revit to stop take a deep breath and ok now you may continue. Sometimes Revit tries to do something before it has fully completed the task from before.

Not sure why you want to have a Transaction.End only run based on a condition. Can you provide more information on this?

0 Likes

#3

My solution was always to pass a null, generating errors but who cares as that branch doesn’t do anything anyway. You can also wrap each item in a nested function via design script (circumventing the errors in the most obtuse way possible which might actually be a big which could get ‘fixed’ someday) or use a custom node to allow for error handling (effectively the same as the wrapping in design script)

1 Like

#4

Could you post your code ?

0 Likes

#5

It’s a ginormous Batch Plot script, but I basically just want to switch between printers based on user input. I’m using null input right now and it returns an error message when I run it successfully through Dynamo Player. I was hoping I could clean that up a bit, but it sounds like ending a transaction doesn’t stop the branch.

0 Likes

#6

Not the answer you are probably looking for but.

0 Likes

#7

I feel like you could use a single branch for this and just modify the data being passed. Impossible to say without seeing it. Passing the warning created by sending a null along shouldn’t cause any issue though.

0 Likes

#8

Thanks @Steven for guiding @david.burow to my solution…

@david.burow try also to see the entire solution for printing…

2 Likes